network-transport-inmemory-0.5.4: In-memory instantiation of Network.Transport
Safe HaskellNone
LanguageHaskell2010

Network.Transport.InMemory

Description

In-memory implementation of the Transport API.

Synopsis

Documentation

createTransport :: IO Transport Source #

Create a new Transport.

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

createTransportExposeInternals :: IO (Transport, TransportInternals) Source #

Create a new Transport exposing internal state.

Useful for testing and/or debugging purposes. Should not be used in production. No guarantee as to the stability of the internals API.

For testing purposes

breakConnection Source #

Arguments

:: TransportInternals 
-> EndPointAddress

From connection

-> EndPointAddress

To connection

-> String

Error message

-> IO () 

Function that simulate failing connection between two endpoints, after calling this function both endpoints will receive ConnectionEventLost message, and all LocalConnectionValid connections will be put into LocalConnectionFailed state.