Skip to content

Commit e6278fa

Browse files
committed
Merge PR #596
2 parents 74c8e51 + 78b7fd5 commit e6278fa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Network/Socket.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
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
@@ -91,7 +91,7 @@
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
@@ -108,9 +108,6 @@
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.
110110
module 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
)
405406
import Network.Socket.Cbits
406407
import Network.Socket.Fcntl

0 commit comments

Comments
 (0)