diff options
Diffstat (limited to 'ghc/misc/examples/net005/Main.hs')
-rw-r--r-- | ghc/misc/examples/net005/Main.hs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/ghc/misc/examples/net005/Main.hs b/ghc/misc/examples/net005/Main.hs deleted file mode 100644 index ec504aa480..0000000000 --- a/ghc/misc/examples/net005/Main.hs +++ /dev/null @@ -1,37 +0,0 @@ -{- server - -Server as net001 but for Unix Domain Datagram sockets. - -TESTS: - socket - bindSocket - readSocket - --} - - -module Main where - -import SocketPrim - - -main = - socket AF_UNIX Datagram 0 >>= \ s -> - bindSocket s (SockAddrUnix "sock") >> - - let - loop = - putStr "*** Start of Transfer ***\n" >> - let - read_all = - readSocket s 1024 >>= \ (str, nbytes) -> - if nbytes /= 0 then - putStr str >> - read_all - else - putStr "\n*** End of Transfer ***\n" - in - read_all - in - loop - |