lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


hello Peter,

On Mon, Jan 17, 2011 at 6:22 PM, Peter Odding <peter@peterodding.com> wrote:
> Your Lua code doesn't receive any 'notifications' except an error
> when you try to use a socket that's been closed because of a timeout
> (despite having set the keep-alive option).

Do I understand correctly that 'use a socket' here means strictly to
try reading from that socket ?

> http://en.wikipedia.org/wiki/Keepalive#TCP_Keepalive

I did look into that, and what I understood is that despite LuaSocket
supports keep-alive messages, it doesn't allow a full configuration of
the 3 parameters described in that page (or if it does, none is
documented).

What I try to do is as simple as this:
- establish a tcp connection between 2 machines
- as soon as the server crashes and the connection is somehow broken,
the client must do something

I say 'crashes' because no assumptions are made on the server-side:
there are no calls to 'server:close()' or 'server:shutdown()'