@hackage quic-simple0.1.1.0
Quick-start wrappers for QUIC
Categories
License
BSD-3-Clause
Maintainer
aenor.realm@gmail.com
Links
Versions
Installation
Dependencies (13)
- async
- base >=4.7 && <5
- bytestring
- crypton
- crypton-x509
- hourglass Show all…
Dependents (0)
quic-simple
A set of wrappers for getting started with QUIC easier.
QUIC.runServer [("127.0.0.1", 14443)] \conn stream ->-- start a generic server with random TLS credentials and auto-accept the first stream.QUIC.runClient "127.0.0.1" "14443" \conn stream ->-- start a generic client and request an initial stream.(writeQ, readQ) <- QUIC.streamCodec encode decodeIncremental stream-- convert a stream to a pair of queues.(writeQ, readQ) <- QUIC.streamSerialise stream-- run a CBOR codec over a stream.
An extra-simple pair of wrappers for QUIC and dirty RPC:
QUIC.runServerSimple "127.0.0.1" 14443 handleCall-- start a CBOR server runningstreamSerialise.(stop, call) <- QUIC.startClientSimple "127.0.0.1" "14443"-- spawn a CBOR client runningstreamSerialise.
See tests for copypastable examples of different wrapping levels.