Safe Haskell | None |
---|---|
Language | Haskell98 |
In-memory implementation of the Transport API.
- createTransport :: IO Transport
- createTransportExposeInternals :: IO (Transport, TransportInternals)
- newtype TransportInternals = TransportInternals (TVar TransportState)
- breakConnection :: TransportInternals -> EndPointAddress -> EndPointAddress -> String -> IO ()
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
newtype TransportInternals Source
TransportInternals (TVar TransportState) |
:: TransportInternals | |
-> EndPointAddress | |
-> EndPointAddress | |
-> 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.