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 48
48
-- >
49
49
-- > -- from the "network-run" package.
50
50
-- > runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a
51
- -- > runTCPServer mhost port server = withSocketsDo $ do
51
+ -- > runTCPServer mhost port server = do
52
52
-- > addr <- resolve
53
53
-- > E.bracket (open addr) close loop
54
54
-- > where
91
91
-- >
92
92
-- > -- from the "network-run" package.
93
93
-- > runTCPClient :: HostName -> ServiceName -> (Socket -> IO a) -> IO a
94
- -- > runTCPClient host port client = withSocketsDo $ do
94
+ -- > runTCPClient host port client = do
95
95
-- > addr <- resolve
96
96
-- > E.bracket (open addr) close client
97
97
-- > where
108
108
-- threads vs a single 'Socket': one thread reads data from a 'Socket'
109
109
-- only and the other thread writes data to the 'Socket' only.
110
110
module Network.Socket (
111
- -- * Initialisation
112
- withSocketsDo ,
113
-
114
111
-- * Address information
115
112
getAddrInfo ,
116
113
@@ -401,6 +398,10 @@ import Network.Socket.Buffer hiding (
401
398
recvBufMsg ,
402
399
sendBufMsg ,
403
400
sendBufTo ,
401
+
402
+ -- * Initialisation on Windows
403
+ withSocketsDo ,
404
+
404
405
)
405
406
import Network.Socket.Cbits
406
407
import Network.Socket.Fcntl
You can’t perform that action at this time.
0 commit comments