Ticket #2943: Accept.hs

File Accept.hs, 219 bytes (added by h.holtmann, 6 years ago)
Line 
1import Network
2import Control.Concurrent
3
4main = withSocketsDo $ do
5    tid <- forkIO $ do
6        s <- listenOn (PortNumber 1234)
7        accept s
8        return ()
9    threadDelay 2000000
10    killThread tid