instance MTaskDuplex TCPSettings where
synFun :: TCPSettings (Shared Channels) -> Task ()
- synFun s channels = catchAll (
+ synFun s channels =
tcpconnect s.host s.port channels {ConnectionHandlers|
onConnect=onConnect,
whileConnected=whileConnected,
- onDisconnect=onDisconnect} @! ())
- (\v->traceValue v @! ())
+ onDisconnect=onDisconnect} @! ()
where
onConnect :: String ([MTaskMSGRecv],[MTaskMSGSend],Bool) -> (MaybeErrorString String, Maybe ([MTaskMSGRecv],[MTaskMSGSend],Bool), [String], Bool)
onConnect _ (msgs,send,sendStopped) = (Ok "", Just (msgs,[],sendStopped), map encode send, False)