AdamMaynard24
2006-11-15 16:22:32 UTC
I'm using the WSAAsyncSelect() model for a server. Clients that
connect, should be able to connect for many many hours if they like to
leave their client's connected. This is fine - it is a chat server and
typically, people will idle for days in some cases, so I don't want to
disconnect sockets based on idleness.
However, I would like to determine if a connection has stopped
functioning. Now if these are all TCP/IP connections using this
asynchronous server model, does TCP/IP handle any connections that
might drop due to network failures etc? and therefore, generate an
FD_CLOSE?
Or.. perhaps I need to ping all inactive clients after a set period of
inactivity, and if there's no point - timeout the connection, and close
the socket?
Kind regards. Adam.
connect, should be able to connect for many many hours if they like to
leave their client's connected. This is fine - it is a chat server and
typically, people will idle for days in some cases, so I don't want to
disconnect sockets based on idleness.
However, I would like to determine if a connection has stopped
functioning. Now if these are all TCP/IP connections using this
asynchronous server model, does TCP/IP handle any connections that
might drop due to network failures etc? and therefore, generate an
FD_CLOSE?
Or.. perhaps I need to ping all inactive clients after a set period of
inactivity, and if there's no point - timeout the connection, and close
the socket?
Kind regards. Adam.