MyNixOS website logo
Description

Reflex bindings for libtelnet.

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.

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

Metadata

Version

0.2.0.0

Platforms (21)

    Linux
Show all
  • aarch64-linux
  • armv5tel-linux
  • armv6l-linux
  • armv7a-linux
  • armv7l-linux
  • i686-linux
  • loongarch64-linux
  • m68k-linux
  • microblaze-linux
  • microblazeel-linux
  • mips-linux
  • mips64-linux
  • mips64el-linux
  • mipsel-linux
  • powerpc64-linux
  • powerpc64le-linux
  • riscv32-linux
  • riscv64-linux
  • s390-linux
  • s390x-linux
  • x86_64-linux