X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=tcp%2Ftest.icl;h=edfea7ada3baa0853261e04fcc299b4300f4bd9a;hb=95e99be6bdd04513688b88f1afaefac360eeff1d;hp=29a4b712d104635616413edba1831b5f64d59830;hpb=938d3406c1e406db293024b9a5710579a0090893;p=clean-tests.git diff --git a/tcp/test.icl b/tcp/test.icl index 29a4b71..edfea7a 100644 --- a/tcp/test.icl +++ b/tcp/test.icl @@ -4,23 +4,22 @@ import iTasks import StdMisc,StdDebug import Data.Maybe -Start w = startEngine t w +Start w = doTasks (onStartup t) w t = withShared () \channels-> - forever (chooseAction [(Action "Set", ())] >>- \_->set () channels) - ||- tcpconnect "localhost" 8123 channels + tcpconnect "localhost" 8123 channels {ConnectionHandlers| onConnect=onConnect, onData=onData, onShareChange=onShareChange, onDisconnect=onDisconnect} where - onConnect acc () - | not (trace_tn "onConnect") = undef + onConnect cid acc () + | not (trace_tn ("onConnect: " +++ toString cid)) = undef = (Ok "", Nothing, [], False) onData newdata acc () - | not (trace_tn "onData") = undef + | not (trace_tn ("onData: " +++ newdata)) = undef = (Ok "", Nothing, [], False) onShareChange acc ()