It complaint :... use Socket; use POSIX; use IO::Handle; ... sub onWheelSFSuccess { my ( $heap, $clientSocket, $peerHostN, $peerPort ) = @_[ HEAP, ARG0, ARG1, ARG2 ]; my $peerHost = inet_ntoa($peerHostN); my $timeout = pack( 'll', 5, 0 ); #$clientSocket->sockopt(SO_RCVTIMEO, $timeout ); #$clientSocket->sockopt(SO_SNDTIMEO, $timeout ); setsockopt ( $clientSocket, SOL_SOCKET, SO_RCVTIMEO, $timeout ) or warn "Can't do setdosockotp: $!\n"; setsockopt ( $clientSocket, SOL_SOCKET, SO_SNDTIMEO, $timeout ) or warn "Can't do setdosockotp: $!\n"; my $ioWheel = POE::Wheel::ReadWrite->new( Handle => $clientSocket, InputEvent => 'onWheelRWInput', ErrorEvent => 'onWheelRWError', Filter => POE::Filter::Stream->new(), ); ......
Can't do setdosockotp: Invalid argument Can't do setdosockotp: Invalid argument
In reply to Re^2: How to set a timeout for the socket filehandle generated by POE::Wheel::SocketFactory ?
by sunshine_august
in thread How to set a timeout for the socket filehandle generated by POE::Wheel::SocketFactory ?
by sunshine_august
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |