tsets
[clean-tests.git] / tcp / test.icl
index 29a4b71..edfea7a 100644 (file)
@@ -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 ()