X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Devices%2FmTaskTCP.icl;h=314799b0c9659bd448fd435717a52a578d8734b2;hb=a2b8b2a0de173f92092bf6cbbed23551e674ca3c;hp=dfa7f2fbe3dfbad2b62504db46f528c0c9fa2fc4;hpb=03f652f7afb24678d565d1b12f12b0fa27444dd2;p=mTask.git diff --git a/Devices/mTaskTCP.icl b/Devices/mTaskTCP.icl index dfa7f2f..314799b 100644 --- a/Devices/mTaskTCP.icl +++ b/Devices/mTaskTCP.icl @@ -13,12 +13,11 @@ getmTaskTCPDevice = TCPDevice <$> enterInformation "Settings" [] 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)