File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 4848-- >
4949-- > -- from the "network-run" package.
5050-- > runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a
51- -- > runTCPServer mhost port server = withSocketsDo $ do
51+ -- > runTCPServer mhost port server = do
5252-- > addr <- resolve
5353-- > E.bracket (open addr) close loop
5454-- > where
9191-- >
9292-- > -- from the "network-run" package.
9393-- > runTCPClient :: HostName -> ServiceName -> (Socket -> IO a) -> IO a
94- -- > runTCPClient host port client = withSocketsDo $ do
94+ -- > runTCPClient host port client = do
9595-- > addr <- resolve
9696-- > E.bracket (open addr) close client
9797-- > where
108108-- threads vs a single 'Socket': one thread reads data from a 'Socket'
109109-- only and the other thread writes data to the 'Socket' only.
110110module Network.Socket (
111- -- * Initialisation
112- withSocketsDo ,
113-
114111 -- * Address information
115112 getAddrInfo ,
116113
@@ -401,6 +398,10 @@ import Network.Socket.Buffer hiding (
401398 recvBufMsg ,
402399 sendBufMsg ,
403400 sendBufTo ,
401+
402+ -- * Initialisation on Windows
403+ withSocketsDo ,
404+
404405 )
405406import Network.Socket.Cbits
406407import Network.Socket.Fcntl
You can’t perform that action at this time.
0 commit comments