reflex-libtelnet: Reflex bindings for libtelnet

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

Wraps https://git.sr.ht/~jack/libtelnet-haskell , so you can handle telnet data streams using reflex Reflex.Events. See README.md or Reflex.LibTelnet to get started.


[Skip to Readme]

Modules

[Last Documentation]

  • Reflex
    • Reflex.LibTelnet

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0
Change log CHANGELOG.md
Dependencies base (>=4.11 && <4.16), bytestring (>=0.10.8.2 && <0.12), dependent-map (>=0.3 && <0.5), dependent-sum (>=0.6.2.0 && <=0.8), dependent-sum-template (>=0.1 && <0.2), libtelnet (>=0.1 && <0.2), reflex (>=0.5 && <0.9) [details]
Tested with ghc ==8.8.4 || ==8.10.7 || ==9.0.2
License GPL-3.0-or-later
Copyright (c) 2019, 2022 Jack Kelly
Author Jack Kelly
Maintainer jack@jackkelly.name
Category Network
Home page https://git.sr.ht/~jack/reflex-libtelnet
Bug tracker https://todo.sr.ht/~jack/reflex-libtelnet
Source repo head: git clone https://git.sr.ht/~jack/reflex-libtelnet
Uploaded by jack at 2022-05-21T07:12:23Z
Distributions
Downloads 497 total (3 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2022-05-22 [all 4 reports]

Readme for reflex-libtelnet-0.2.0.0

[back to package description]

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

  1. 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 call newTelnetConfig and overwrite the fields you care about using record updates or lenses. You will almost certainly want to overwrite recv to be the stream of incoming data from a socket, and send to be the stream of outgoing data from your application.

    • If you want to use lenses, use the generic-lens or generic-optics to get your preferred flavour of optic. Make sure to use the field' @"fieldName" version (i.e. not #fieldName or un-primed field), otherwise GHC will struggle to infer the type of t when setting fields in ReflexConfig t.
  2. Call telnet config, and save the resulting TelnetEvents t. This structure holds the output event streams from a single telnet state tracker.

  3. Wire the output events into your application.

Other Resources