![]() |
|
XP is just a number | |
PerlMonks |
syswrite and closed socketsby InfiniteLoop (Hermit) |
on Aug 11, 2006 at 14:52 UTC ( #566852=perlquestion: print w/replies, xml ) | Need Help?? |
InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks,
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
Back to
Seekers of Perl Wisdom
|
|