Safe Haskell | None |
---|---|
Language | Haskell2010 |
Intended to be imported qualified.
Synopsis
- data NewConnection peerAddr handle = NewConnection ! Provenance !( ConnectionId peerAddr) ! DataFlow !handle
-
data
ControlChannel
m msg =
ControlChannel
{
- readMessage :: STM m msg
- writeMessage :: msg -> STM m ()
- type ServerControlChannel (muxMode :: MuxMode ) peerAddr bytes m a b = ControlChannel m ( NewConnection peerAddr ( Handle muxMode peerAddr bytes m a b))
- newControlChannel :: forall m srvCntrlMsg. MonadLabelledSTM m => m ( ControlChannel m srvCntrlMsg)
- newOutboundConnection :: ControlChannel m ( NewConnection peerAddr handle) -> ConnectionId peerAddr -> DataFlow -> handle -> STM m ()
- newInboundConnection :: ControlChannel m ( NewConnection peerAddr handle) -> ConnectionId peerAddr -> DataFlow -> handle -> STM m ()
Documentation
data NewConnection peerAddr handle Source #
Announcment message for a new connection.
NewConnection ! Provenance !( ConnectionId peerAddr) ! DataFlow !handle |
Announce a new connection.
Inbound protocol governor
will start
responder protocols using
|
Instances
Show peerAddr => Show ( NewConnection peerAddr handle) Source # | |
|
data ControlChannel m msg Source #
Server control channel. It allows to pass
STM
transactions which will
resolve to
NewConnection
. Server's monitoring thread is the consumer
of this messages; there are two produceres: accept loop and connection
handler for outbound connections.
ControlChannel | |
|
type ServerControlChannel (muxMode :: MuxMode ) peerAddr bytes m a b = ControlChannel m ( NewConnection peerAddr ( Handle muxMode peerAddr bytes m a b)) Source #
newControlChannel :: forall m srvCntrlMsg. MonadLabelledSTM m => m ( ControlChannel m srvCntrlMsg) Source #
newOutboundConnection :: ControlChannel m ( NewConnection peerAddr handle) -> ConnectionId peerAddr -> DataFlow -> handle -> STM m () Source #
newInboundConnection :: ControlChannel m ( NewConnection peerAddr handle) -> ConnectionId peerAddr -> DataFlow -> handle -> STM m () Source #