network-msg-0.8: Recvmsg and sendmsg bindings.

Safe HaskellNone
LanguageHaskell98

Network.Socket.Msg.CMsg

Synopsis

Documentation

data CMsg Source #

Constructors

CMsg 

Instances

class Binary a => CMsgable a where Source #

Class for binary structures that can be used as control messages (cmsg(3)).

Complete definition requires for a type to be an instance of Binary class, as well as to provide getCMsgLevel and getCMsgType methods.

Note that the argument of getCMsgLevel and getCMsgType methods should not be used as it might be undefined.

Minimal complete definition

getCMsgLevel, getCMsgType

filterCMsgs :: CMsgable a => a -> [CMsg] -> [CMsg] Source #

Filter specific kind of control messages.

Example: filterCMsgs (undefined :: IpPktInfo) cmsgs