Skip to content

Commit 15193be

Browse files
committed
improving docs as suggested by vdukhovni.
1 parent 3aa7b18 commit 15193be

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

Network/Socket/Buffer.hsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ mkInvalidRecvArgError loc = ioeSetErrorString (mkIOError
196196
InvalidArgument
197197
loc Nothing Nothing) "non-positive length"
198198

199-
-- | Send data from the socket using sendmsg(2).
199+
-- | Send data to the socket using sendmsg(2).
200200
sendBufMsg :: SocketAddress sa
201201
=> Socket -- ^ Socket
202202
-> sa -- ^ Destination address

Network/Socket/ByteString/IO.hsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ withWSABuffromBS cs f = do
286286
getBufsiz :: ByteString -> IO (Ptr Word8, Int)
287287
getBufsiz (PS fptr off len) = withForeignPtr fptr $ \ptr -> return (ptr `plusPtr` off, len)
288288

289-
-- | Send data from the socket using sendmsg(2).
289+
-- | Send data to the socket using sendmsg(2).
290290
sendMsg :: Socket -- ^ Socket
291291
-> SockAddr -- ^ Destination address
292292
-> [ByteString] -- ^ Data to be sent

Network/Socket/Options.hsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ instance Storable StructLinger where
290290
(#poke struct linger, l_linger) p linger
291291
#endif
292292

293-
-- | Executes the given action and ignoring the result only when the specified
294-
-- socket option is valid.
293+
-- | Execute the given action only when the specified socket option is
294+
-- supported. Any return value is ignored.
295295
whenSupported :: SocketOption -> IO a -> IO ()
296296
whenSupported s action
297297
| isSupportedSocketOption s = action >> return ()

Network/Socket/Posix/Cmsg.hsc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ filterCmsg cid cmsgs = filter (\cmsg -> cmsgId cmsg == cid) cmsgs
8383

8484
----------------------------------------------------------------
8585

86-
-- | A class to encode and decode control message.
86+
-- | Control message type class.
87+
-- Each control message type has a numeric 'CmsgId' and a 'Storable'
88+
-- data representation.
8789
class Storable a => ControlMessage a where
8890
controlMessageId :: a -> CmsgId
8991

Network/Socket/SockAddr.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sendBufTo = G.sendBufTo
7474
recvBufFrom :: Socket -> Ptr a -> Int -> IO (Int, SockAddr)
7575
recvBufFrom = G.recvBufFrom
7676

77-
-- | Send data from the socket using sendmsg(2).
77+
-- | Send data to the socket using sendmsg(2).
7878
sendBufMsg :: Socket -- ^ Socket
7979
-> SockAddr -- ^ Destination address
8080
-> [(Ptr Word8,Int)] -- ^ Data to be sent

0 commit comments

Comments
 (0)