Socket problem

  • Thread starter Thread starter Laszlo Csabi
  • Start date Start date
L

Laszlo Csabi

Hi Folks,

I'm using c# to create a server client application.
I have to check if the socket is in"CLOSE_WAIT" state. Anyone knows any
solution for this?

I tried to used Socket.Connected but it doesn't give a false message if the
socket is in "CLOSE_WAIT" state.

Thanks

Laszlo
 
I would be interested in knowing the solution too. I had the same problem.
What I ended up doing is timestamping the last time the client sent data and
if the client is idle for a certain period of time(10 minutes), close the
connection from the server end.

Thanks
Srinivas
 
Hello,

I have had the same problem. I have narrowed it down to a server side
problem. The server does not seem to be closing the connection properly.

I have tried some commericial socket controls to see how they work, and they
do not leave the clients in a CLOSE_WAIT. May have to go with a commerical
control.

Good luck.
 
Thanks. Can you list a few that you have tried ?
I think its something to do with .Net . Even if the cleint disconnects, the
Write does not throw an exception and Can Write is still true.
 
Hello,

The Dart TCP Socket .NET control works great. It costs $249. IP Works
also has a good one, but it costs $399.

I have seen other posts on the internet where people are frustrated with the
..NET Socket offering.

Thanks
 
Back
Top