diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-06-29 21:58:46 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-06-29 21:58:46 -0500 |
commit | d4216d4cf36b4348f3b22b30c79b0bdcd2b719ca (patch) | |
tree | f35e2fb48b2c7e924b0e58c012abb994d60e7323 | |
parent | 68dca4c9d58c798b3df17e8e638b7d9059fe6b61 (diff) | |
download | io-socket-telnet-halfduplex-d4216d4cf36b4348f3b22b30c79b0bdcd2b719ca.tar.gz io-socket-telnet-halfduplex-d4216d4cf36b4348f3b22b30c79b0bdcd2b719ca.zip |
synopsis and method docs
-rw-r--r-- | lib/IO/Socket/Telnet/HalfDuplex.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/IO/Socket/Telnet/HalfDuplex.pm b/lib/IO/Socket/Telnet/HalfDuplex.pm index 588de37..5b82130 100644 --- a/lib/IO/Socket/Telnet/HalfDuplex.pm +++ b/lib/IO/Socket/Telnet/HalfDuplex.pm @@ -9,6 +9,12 @@ IO::Socket::Telnet::HalfDuplex - more reliable telnet communication =head1 SYNOPSIS + use IO::Socket::Telnet::HalfDuplex; + my $socket = IO::Socket::Telnet::HalfDuplex->new(PeerAddr => 'localhost'); + while (1) { + $socket->send(scalar <>); + print $socket->read; + } =head1 DESCRIPTION @@ -19,6 +25,9 @@ IO::Socket::Telnet::HalfDuplex - more reliable telnet communication =head2 new(PARAMHASH) +The constructor takes mostly the same arguments as L<IO::Socket::INET>, but +also accepts the key C<PingOption>, which takes an integer from 0-255 to use +for the ping/pong mechanism. This defaults to 99 if not specified. =cut @@ -44,6 +53,7 @@ sub telnet_simple_callback { =head2 read() +Performs a (hopefully) full read on the socket. Returns the data read. Throws an exception if the connection ends before all data is read. =cut |