From d4216d4cf36b4348f3b22b30c79b0bdcd2b719ca Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 29 Jun 2009 21:58:46 -0500 Subject: synopsis and method docs --- lib/IO/Socket/Telnet/HalfDuplex.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') 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, but +also accepts the key C, 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 -- cgit v1.2.3-54-g00ecf