NAME

IO::Socket::Telnet - Transparent telnet negotiation for IO::Socket::INET

VERSION

Version 0.01 released 15 Sep 07

SYNOPSIS

use IO::Socket::Telnet;
my $socket = IO::Socket::Telnet->new(PeerAddr => 'random.server.org',
                                     PeerPort => 23);
while (1) {
    $socket->send(scalar <>);
    defined $socket->recv(my $x, 4096) or die $!;
    print $x;
}

DESCRIPTION

Telnet is a simple protocol that sits on top of TCP/IP. It handles the negotiation of various options, both about the connection itself (ECHO) and the setup of both sides of the party (NAWS, TTYPE).

This is a wrapper around IO::Socket::INET that both strips out the telnet escape sequences and lets you handle the negotiation in a high-level manner.

There is currently no interface for defining callbacks. This will be rectified very soon. The module as it stands is still useful for stripping out telnet escape sequences.

This module is likely missing large parts of the telnet spec. Please let me know if you need particular things implemented. Failing test cases are the best bug reports!

CAVEATS

You must use the $socket->recv(...) method call form. recv($socket, ...) will not invoke the necessary methods. You can use print $socket ... because print currently has no special semantics.

SIMILAR MODULES

Net::Telnet has a similar purpose, to interact via telnet with someone else. The major difference is that Net::Telnet tries to be Expect to some degree as well. This is fine if that's what you need to do, but the author of IO::Socket::Telnet wants to play NetHack on a remote server, and Net::Telnet doesn't help him very much.

SEE ALSO

Net::Telnet, IO::Socket::INET, IO::Socket, IO::Handle

AUTHOR

Shawn M Moore, <sartak at gmail.com>

BUGS

No known bugs.

Please report any bugs through RT: email bug-io-socket-telnet at rt.cpan.org, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IO-Socket-Telnet.

SUPPORT

You can find this documentation for this module with the perldoc command.

perldoc IO::Socket::Telnet

You can also look for information at:

COPYRIGHT AND LICENSE

Copyright 2007 Shawn M Moore.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.