network-transport-inmemory-0.5.2: In-memory instantiation of Network.Transport

Safe HaskellNone




Internal part of the implementation. This module is for internal use or advanced debuging. There are no guarantees about stability of this module.



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.

Internal structures

Low level functionality

apiBreakConnection :: TVar TransportState -> EndPointAddress -> EndPointAddress -> String -> STM () Source #

Tear down functions that should be called in case if conncetion fails.

apiSend :: TChan Event -> TVar TransportState -> LocalConnection -> [ByteString] -> IO (Either (TransportError SendErrorCode) ()) Source #

Send a message over a connection

apiClose :: TChan Event -> TVar TransportState -> LocalConnection -> IO () Source #

Close a connection