File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 39
39
-- > sendAll s msg
40
40
-- > talk s
41
41
-- >
42
+ -- > -- from the "network-run" package.
42
43
-- > runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a
43
44
-- > runTCPServer mhost port server = withSocketsDo $ do
44
45
-- > addr <- resolve
77
78
-- > putStr "Received: "
78
79
-- > C.putStrLn msg
79
80
-- >
81
+ -- > -- from the "network-run" package.
80
82
-- > runTCPClient :: HostName -> ServiceName -> (Socket -> IO a) -> IO a
81
83
-- > runTCPClient host port client = withSocketsDo $ do
82
84
-- > addr <- resolve
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ main = runTCPClient "127.0.0.1" "3000" $ \s -> do
14
14
putStr " Received: "
15
15
C. putStrLn msg
16
16
17
+ -- from the "network-run" package.
17
18
runTCPClient :: HostName -> ServiceName -> (Socket -> IO a ) -> IO a
18
19
runTCPClient host port client = withSocketsDo $ do
19
20
addr <- resolve
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ main = runTCPServer Nothing "3000" talk
17
17
sendAll s msg
18
18
talk s
19
19
20
+ -- from the "network-run" package.
20
21
runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a ) -> IO a
21
22
runTCPServer mhost port server = withSocketsDo $ do
22
23
addr <- resolve
You can’t perform that action at this time.
0 commit comments