|
IO::Sockatmark - Perl extension for TCP urgent data |
IO::Sockatmark - Perl extension for TCP urgent data
use IO::Sockatmark; use IO::Socket;
my $sock = IO::Socket::INET->new('some_server');
$sock->read(1024,$data) until $sock->atmark;
This module adds the atmark() method to the standard IO::Socket class.
This can be used to detect the ``mark'' created by the receipt of TCP
urgent data.
atmark()atmark() method true if the socket is currently positioned at the
urgent data mark, false otherwise.
sockatmark($socket)atmark() function returns true if the socket is currently positioned
at the urgent data mark, false otherwise. This will work with an IO::Socket
object, as well as with a conventional filehandle socket.
This module is critically dependent on the system ioctl() constant
SIOCATMARK, which is located in different places on different systems.
The module compiles and works correctly on Linux, Solaris and Tru64
Unix systems, but probably needs tweaking to compile on others.
Please send patches.
Copyright 2001, Lincoln Stein <lstein@cshl.org>.
This module is distributed under the same terms as Perl itself. Feel free to use, modify and redistribute it as long as you retain the correct attribution.
perl(1), IO::Socket(3)
|
IO::Sockatmark - Perl extension for TCP urgent data |