network-transport-quic-0.1.0: Networking layer for Cloud Haskell based on QUIC
Safe HaskellNone
LanguageHaskell2010

Network.Transport.QUIC.Internal

Synopsis

Documentation

createTransport :: QUICTransportConfig -> IO Transport Source #

Create a new Transport based on the QUIC protocol.

Only a single transport should be created per Haskell process (threads can, and should, create their own endpoints though).

data QUICTransportConfig Source #

Represents the configuration used by the entire transport.

Constructors

QUICTransportConfig 

Fields

Re-export to generate credentials

credentialLoadX509 #

Arguments

:: FilePath

public certificate (X.509 format)

-> FilePath

private key associated

-> IO (Either String Credential) 

try to create a new credential object from a public certificate and the associated private key that are stored on the filesystem in PEM format.

Message encoding and decoding

encodeMessage :: ClientConnId -> [ByteString] -> [ByteString] Source #

Encode a message.

The encoding is composed of a header, and the payloads. The message header is composed of: 1. A control byte, to determine how the message should be parsed. 2. A 32-bit word that encodes the endpoint ID of the destination endpoint; 3. A 32-bit word that encodes the number of frames in the message

The payload frames are each prepended with the length of the frame.