SocketException different handling in linux and win32

A

alberto.poz

In my architecture I have a server component and some clients that
keep an open connection to the server. If I stop the server all the
clients recive a SocketException: connection reset when they're
waiting for a read on the socket and that's good for my purpose.

The problem arises when I try to run the server on linux: the clients
never receive SocketException: connection reset

Does it depend on any options?
 
G

Gordon Beaton

The problem arises when I try to run the server on linux: the
clients never receive SocketException: connection reset

Does it depend on any options?

No, but the normal thing to expect is EOF, not connection reset.
Exactly how the clients detect EOF depends on the specific read
mechanism they use.

If you aren't seeing EOF then I expect you're doing something strange
in your client code, like checking with ready() or available() before
attempting to read. If that's the case, don't.

/gordon

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top