We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1d61d74 + 09b4be1 commit c513332Copy full SHA for c513332
Network/Socket/Handle.hs
@@ -14,6 +14,11 @@ import Network.Socket.Types
14
-- operations on the 'Socket' after calling 'socketToHandle'. To
15
-- close the 'Socket' after 'socketToHandle', call 'System.IO.hClose'
16
-- on the 'Handle'.
17
+--
18
+-- Caveat 'Handle' is not recommended for network programming in
19
+-- Haskell, e.g. merely performing 'hClose' on a TCP socket won't
20
+-- cooperate with peer's 'gracefulClose', i.e. proper shutdown
21
+-- sequence with appropriate handshakes specified by the protocol.
22
23
socketToHandle :: Socket -> IOMode -> IO Handle
24
socketToHandle s mode = invalidateSocket s err $ \oldfd -> do
0 commit comments