Help language development. Donate to The Perl Foundation

Net::Telnet cpan:KAIEPI last updated on 2019-05-13
[![Build Status](](


Net::Telnet - TELNET library for clients and servers


    use Net::Telnet::Client;
    use Net::Telnet::Constants;
    use Net::Telnet::Server;

    my Net::Telnet::Client $client .= new:
        :supported[SGA, ECHO];
    $client.text.tap({ .print });

    await $client.connect;
    await $client.send-text: 'cowsay ayy lmao';

    my Net::Telnet::Server $server .= new:
        :preferred[SGA, ECHO],

    react {
        whenever $server.listen -> $connection {
            $connection.text.tap(-> $text {
                say "{$}:{$connection.port} sent '$text'";
            }, done => {
                # Connection was closed; clean up if necessary.

            LAST {
                # Server was closed; clean up if necessary.

            QUIT {
                # Handle exceptions.
        whenever signal(SIGINT) {


`Net::Telnet` is a library for creating TELNET clients and servers.

Before you get started, read the documentation in the `docs` directory and read the example code in the `examples` directory.

If you are using `Net::Telnet::Client` and don't know what options the server will attempt to negotiate with, run `bin/p6telnet-grep-options` using the server's host and port to grep the list of options it attempts to negotiate with when you first connect to it.

The following options are currently supported:


  * SGA

  * ECHO

  * NAWS


Ben Davies (Kaiepi)


Copyright 2018 Ben Davies

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.