in reply to Trapping socket error in client when server goes away
# socket is already setup, and client accepted # set up masks for use by select my ($rin,$win,$ein) = ("","",""); my ($rout,$wout, $eout) = ($rin, $win, $ein); vec($rin, fileno($client),1) = 1; vec($win, fileno($client),1) = 1; $ein = $rin | $win; # -- code deleted -- # wait until the client is ready for writing if(select(undef,$wout = $win,undef,$timeout)) { # <$client> or sysread } # -- code deleted -- # or # wait until client is ready for writing to if(select(undef,$wout=$win,undef,$timeout)) { # print client or syswrite }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trapping socket error in client when server goes away
by thospel (Hermit) on Oct 20, 2004 at 15:23 UTC | |
by jfroebe (Parson) on Oct 20, 2004 at 18:33 UTC |