Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

SocketException different handling in linux and win32

Thread view: 
alberto.poz@gmail.com - 08 Jan 2008 10:39 GMT
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?
Gordon Beaton - 08 Jan 2008 11:38 GMT
> 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

--


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.