--- /dev/null
+module tcpiptest\r
+\r
+import StdEnv\r
+import StdIO\r
+import StdMaybe\r
+import TCPIP\r
+\r
+hostIP = "127.0.0.1"\r
+hostPort = 1203\r
+\r
+:: *Val = String\r
+:: *State :== PSt Val\r
+\r
+handleComs con st = (con``, st``) where\r
+ (con`, st`) = send "Hello World!\n" con st\r
+ (con``, st``) = send "More text here!\n" con` st`\r
+\r
+Start world = case to of\r
+ TR_Success = handleComs (toStringSChannel con.sChannel) st`\r
+ _ = abort "CONNECTION ERROR" \r
+where\r
+ (Just adr, st) = lookupIPAddress hostIP world\r
+ (to, mcon, st`) = connectTCP_MT Nothing (adr,hostPort) st\r
+ (Just con) = mcon\r