libtelnet: Bindings to libtelnet

[ gpl, library, network ] [ Propose Tags ] [ Report a vulnerability ]

Binds https://github.com/seanmiddleditch/libtelnet , a C library for writing telnet clients and servers. See README.md or Network.Telnet.LibTelnet to get started.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
example

Build the example program

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.9 && <4.17), bytestring (>=0.10.6.0 && <0.12) [details]
Tested with ghc ==9.0.1, ghc ==8.10.6, ghc ==8.8.4, ghc ==8.6.5
License GPL-3.0-or-later
Copyright (c) 2017-2021 Jack Kelly
Author Jack Kelly
Maintainer jack@jackkelly.name
Revised Revision 2 made by jack at 2021-08-23T23:34:50Z
Category Network
Home page https://git.sr.ht/~jack/libtelnet-haskell
Bug tracker https://todo.sr.ht/~jack/libtelnet-haskell
Source repo head: git clone https://git.sr.ht/~jack/libtelnet-haskell
Uploaded by jack at 2021-02-13T06:01:09Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables example
Downloads 866 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user [build log]
All reported builds failed as of 2021-02-13 [all 3 reports]

Readme for libtelnet-0.1.0.1

[back to package description]

Bindings to libtelnet

builds.sr.ht status

This is a wrapper around libtelnet, a C library for handling Telnet streams, including option negotiation, &c. As a cleartext protocol, Telnet is thorougly unsuitable for use on the open internet, but you might have a niche where it makes sense:

  • MU* games still use it, and so the clients people want to use only speak Telnet,
  • You might be speaking Telnet inside a stunnel, or
  • You might have some ancient hardware that can't be updated, and doesn't have ssh, but you want to talk to it using Haskell.

This library hews closely to the interface provided by the C libtelnet, so reading the excellent C documentation will help you. The short version goes something like this:

  1. Define an event handler of type Network.Telnet.LibTelnet.EventHandler. This function receives callbacks that tell you what received data should be propagated to the application, and what bytes need to be sent out over the socket.

  2. Pass your event handler (and some other flags) to Network.Telnet.LibTelnet.telnetInit, which will give you access to a Telnet, a garbage-collected state tracker.

  3. Tell the state tracker that data has arrived on the socket, or that you want to send data to the socket, by passing it to the library's other functions.

Other Resources