Example invocations of applications added
Getty Ritter
9 years ago
31 | 31 | putStrLn ln |
32 | 32 | ~~~~ |
33 | 33 | |
34 | To test this with a TCP connection, use | |
35 | [`tcpclient`](http://cr.yp.to/ucspi-tcp/tcpclient.html): | |
36 | ||
37 | ~~~~{.bash} | |
38 | tcpclient 127.0.0.1 9999 runhaskell sampleclient.hs | |
39 | ~~~~ | |
40 | ||
34 | 41 | ## Sample Server |
35 | 42 | |
36 | 43 | A server which receives a line from the client and sends back the |
42 | 49 | main :: IO () |
43 | 50 | main = ucspiServer $ \ _ -> getLine >>= putstrLn |
44 | 51 | ~~~~ |
52 | ||
53 | To test this with a TCP connection, use | |
54 | [`tcpserver`](http://cr.yp.to/ucspi-tcp/tcpserver.html) | |
55 | ||
56 | ~~~~{.bash} | |
57 | tcpserver 127.0.0.1 9999 runhaskell sampleserver.hs | |
58 | ~~~~ |