@hackage reflex-libtelnet0.1.0.0
Reflex bindings for libtelnet
Categories
License
GPL-3.0-or-later
Maintainer
jack@jackkelly.name
Links
Versions
Installation
Tested Compilers
Dependencies (9)
- base >=4.11 && <4.13
- bytestring >=0.10.8.2 && <0.11
- data-default >=0.7.1.1 && <0.8
- dependent-map >=0.3 && <0.4
- dependent-sum >=0.6.2.0 && <=0.7
- dependent-sum-template >=0.1 && <0.2 Show all…
Dependents (0)
Reflex Bindings to libtelnet
This is a reflex wrapper around
libtelnet, which lets you
describe data flows through the telnet state tracker using reflex
Events.
This library thinly wraps the libtelnet functions, so you should read the libtelnet documentation alongside the haddocks for this package.
Quick Start
-
Assemble a
config :: TelnetConfig t, which holds the event streams that feed into a telnet state tracker. The easiest way to do this is to calldef(there is aninstance Reflex t => Default (TelnetConfig t)) and overwrite the fields you care about using record updates or lenses. You will almost certainly want to overwrite_cRecvto be the stream of incoming data from a socket, and_cSendto be the stream of outgoing data from your application. -
Call
telnet config, and save the resultingTelnetEvents t. This structure holds the output event streams from a single telnet state tracker. -
Wire the ouput events into your application.
Other Resources
-
A telnet echo server exists in the
reflex-libtelnetrepo, outside this package. It is packaged separately so that it can be licensed more permissively, and to minimisereflex-libtelnet's dependency footprint. -
Questions should go to the reflex-libtelnet-discuss mailing list.
-
Bug reports should go to the bug tracker.