in reply to Another Win32 Tk fileevent work around : using ioctl() properly
toioctl($sock, FIONBIO, unpack("I",pack('P',$nonblocking))) == 0 or +die "ioctlsocket(\$sock, FIONBIO,...):$!" ; ... ioctl($hand, FIONREAD, unpack('I',pack('P',$numbytes))) == 0 o +r die "ioctlsocket(\$hand, FIONREAD,...):$!" ;
since the size of integer (4 bytes) was too small to hold the address from the pointer on Strawberry Perl 5.38.0 64 bit.ioctl($sock, FIONBIO, unpack("Q",pack('P',$nonblocking))) == 0 or +die "ioctlsocket(\$sock, FIONBIO,...):$!" ; ... ioctl($hand, FIONREAD, unpack('Q',pack('P',$numbytes))) == 0 o +r die "ioctlsocket(\$hand, FIONREAD,...):$!" ;
|
---|