c# - What event is raised when a .Net Sockets Keep Alive does not receive an ackowledgement? -


i have configured c# .net socket using

m_clientsocket.setsocketoption(socketoptionlevel.socket, socketoptionname.keepalive, convert.toint32(true))  m_clientsocket.iocontrol(iocontrolcode.keepalivevalues, sio_keepalive_vals, result) 

my settings send every 30 seconds , send every 10 seconds when first acknowledgement not received.

i can see keep alive , keep alive ack flags being sent , received server when connection up.

when connection broken can see keep alive being sent , no acknowledgement being received. can see keep alives being sent have changed behaviour in line settings, i.e. being sent every 10 seconds opposed every 30 seconds.

i expecting sort of event fire can respond break (i.e. shutdown socket , start trying recycle it).

can tell me how pick on fact keep alives have noticed connection broken ?

thanks ady

sockets not raise events regarding connectivity state (or else matter). detect failure, need either send or receive operation.

you should indication of failure if poll socket periodically. there example here: instantly detect client disconnection server socket


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -