libtelnet: Bindings to libtelnet

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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]

Properties

Versions0.1.0.0, 0.1.0.0
Change logChangeLog.md
Dependenciesbase (>=4.7 && <5), bytestring (>=0.10.6.0 && <0.11) [details]
LicenseGPL-3.0-or-later
Copyright(c) 2017-2019 Jack Kelly
AuthorJack Kelly
Maintainerjack@jackkelly.name
CategoryNetwork
Home pagehttps://git.sr.ht/~jack/libtelnet-haskell
Bug trackerhttps://todo.sr.ht/~jack/libtelnet-haskell
Source repositoryhead: git clone https://git.sr.ht/~jack/libtelnet-haskell
Executablesexample
UploadedTue Jan 29 22:49:10 UTC 2019 by jack

Modules

[Index]

Flags

NameDescriptionDefaultType
example

Build the example program

DisabledManual

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

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for libtelnet-0.1.0.0

[back to package description]

Bindings to libtelnet

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:

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