e2ad13ae49f910b6d786079d542af7a884a07e73
[ghc-hetmet.git] / ghc / tests / lib / socket / socket006.hs
1 {- client
2
3 Client side of net005
4
5 TESTS:
6     socket
7     connect
8     writeSocket
9     shutdown
10     sClose
11 -}
12
13
14 module Main where
15
16 import SocketPrim
17
18 message     = "Hello World"
19
20
21 main =
22     socket AF_UNIX Datagram 0           >>= \ s ->
23     connect s (SockAddrUnix "sock")     >>
24     
25     writeSocket s message               >>
26     shutdown s ShutdownBoth             >>
27     sClose s