/reflex-backend-socket

Reflex support for socket-based applications

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Data61 Logo

Build Status

This library provides reflex support for writing TCP servers and clients. All the socket operations are wrapped to use Reflex Events, and the underlying sending/receiving/waiting/accepting operations are performed on background threads.

The most important function in this library is Reflex.Backend.Socket.socket, which wraps a Socket to process Event t ByteStrings.

That Socket can come from:

  1. Reflex.Backend.Socket.Accept.accept, if you're making a server;
  2. Reflex.Backend.Socket.Connect.connect, if you're making a client; or
  3. Your favourite networking library.

Check the example subdirectory for some examples. Example clients and servers are provided.