Lincoln D. Stein > IO-Sockatmark > IO::Sockatmark

Download:
IO-Sockatmark-1.00.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.00   Source  

NAME ^

IO::Sockatmark - Perl extension for TCP urgent data

SYNOPSIS ^

  use IO::Sockatmark;
  use IO::Socket;

  my $sock = IO::Socket::INET->new('some_server');
  $sock->read(1024,$data) until $sock->atmark;

DESCRIPTION ^

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.

Methods

$flag = $socket->atmark()

The atmark() method true if the socket is currently positioned at the urgent data mark, false otherwise.

Exported functions

$flag = sockatmark($socket)

The 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.

CAVEATS ^

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.

AUTHOR ^

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.

SEE ALSO ^

perl(1), IO::Socket(3)

syntax highlighting: