|XP is just a number|
syswrite and closed socketsby InfiniteLoop (Hermit)
|on Aug 11, 2006 at 14:52 UTC||Need Help??|
InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:
Im using IO::Socket::INET to communicate with a messaging server. The code somewhat looks like this:
Im implementing a failover mechanism, where if the syswrite fails, I would then connect to another set of host and retry the syswrite.
If the server shutsdown or is not accesssible, the syswrite does not report any errors. I have read the perldoc's and searched this venerable monastry, but did not find any clues. Any help is appreciated. Thanks.
Update: According to the docs, syswrite returns undef if there was an error. I modified the syswrite to look like this:
just before the syswrite, I shutdown the server to which the socket was connected and attempted to write to the socket, it did not report any error