projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
net006
/
Main.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 2 >>
27
sClose s