> module Main (main) where #ifdef __HUGS__ > import NetFIFO as Network #else > import NetTCP as Network #endif > main = do > putStrLn "Initializing networking-function" > net@(listen,accept,connect, close, write, read) <- Network.startup "AClient" > putStrLn "Connecting to port 11111" > h <- connect "localhost" 11111 > putStrLn "Writing ´test´" > write h "test" > putStr "Reading, got ´" > msg <- read h > putStrLn $ msg ++ "´." > putStrLn "Closing" > close h