network-transport-inmemory-0.5.41: In-memory instantiation of Network.Transport
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Transport.InMemory.Internal

Description

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

Synopsis

Documentation

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