Disposing unused sockets

  • Thread starter Thread starter Christoph Duesmann
  • Start date Start date
C

Christoph Duesmann

Hi !

My socket server doesn't remove the socket if a client is disconnected
suddenly (network problems etc.)
If the client starts the app again, it is existing two times in the servers
hashtable.

I don't know how to "dispose" the socket completely.

Any ideas ?

thanks a lot

Christoph duesmann
 
I don't know how and if you are doing a shutdown on both sides.
Can you show a scheme of you code? Are you using some finally or using
statement?

-tom

Christoph Duesmann ha scritto:
 
Do you check for a read of 0 bytes? This is how the Berkeley interface
identifies an unexpected (not shutdown) socket disconnection.

Mike Ober.
 
Back
Top