No title

Anonymous Coward 2018-04-16 10:44:41.650722 UTC

1
2offerServiceNegotiation :: (ConnectionSetup m,MonadIO m) =>
3 TChan ServiceRequest -> TChan Frame -> State m Idle -> Either StateMachineException (State m Offered)
4
5offerServiceNegotiation connectionTChan frameTchan idleState =
6 do
7 let eitherEvent = (readEitherTChan connectionTChan frameTchan)
8 -- e <- liftIO $ atomically $ readTChan connectionTChan -- eitherEvent
9 e <- liftIO $ atomically $ eitherEvent
10
11
12 if isLeft e
13 then
14 promptPrint "read session-request from the TChan"
15 -- promptPrint "create a new session, add to map"
16 -- promptPrint "send that Offer message out on the network"
17 else
18 promptPrint "Exception"
19 let connection = "connection" :: ServiceRequest
20 initServiceNegotiationEvent idleState connection