Safe Haskell | None |
---|---|
Language | Haskell98 |
- type HostAddress = Word32
- type HostAddress6 = (Word32, Word32, Word32, Word32)
- type FlowInfo = Word32
- type ScopeID = Word32
- newtype PortNumber = PortNum Word16
- data SockAddr = SockAddrInet PortNumber HostAddress
- peekSockAddr :: Ptr SockAddr -> IO SockAddr
- pokeSockAddr :: Ptr a -> SockAddr -> IO ()
- sizeOfSockAddr :: SockAddr -> Int
- sizeOfSockAddrByFamily :: Family -> Int
- withSockAddr :: SockAddr -> (Ptr SockAddr -> Int -> IO a) -> IO a
- withNewSockAddr :: Family -> (Ptr SockAddr -> Int -> IO a) -> IO a
- data Family
- = AF_UNSPEC
- | AF_UNIX
- | AF_INET
- | AF_INET6
- | AF_IMPLINK
- | AF_PUP
- | AF_CHAOS
- | AF_NS
- | AF_NBS
- | AF_ECMA
- | AF_DATAKIT
- | AF_CCITT
- | AF_SNA
- | AF_DECnet
- | AF_DLI
- | AF_LAT
- | AF_HYLINK
- | AF_APPLETALK
- | AF_ROUTE
- | AF_NETBIOS
- | AF_NIT
- | AF_802
- | AF_ISO
- | AF_OSI
- | AF_NETMAN
- | AF_X25
- | AF_AX25
- | AF_OSINET
- | AF_GOSSIP
- | AF_IPX
- | Pseudo_AF_XTP
- | AF_CTF
- | AF_WAN
- | AF_SDL
- | AF_NETWARE
- | AF_NDD
- | AF_INTF
- | AF_COIP
- | AF_CNT
- | Pseudo_AF_RTIP
- | Pseudo_AF_PIP
- | AF_SIP
- | AF_ISDN
- | Pseudo_AF_KEY
- | AF_NATM
- | AF_ARP
- | Pseudo_AF_HDRCMPLT
- | AF_ENCAP
- | AF_LINK
- | AF_RAW
- | AF_RIF
- | AF_NETROM
- | AF_BRIDGE
- | AF_ATMPVC
- | AF_ROSE
- | AF_NETBEUI
- | AF_SECURITY
- | AF_PACKET
- | AF_ASH
- | AF_ECONET
- | AF_ATMSVC
- | AF_IRDA
- | AF_PPPOX
- | AF_WANPIPE
- | AF_BLUETOOTH
- throwSocketError :: String -> IO a
- throwSocketErrorCode :: String -> CInt -> IO a
- throwSocketErrorIfMinus1_ :: (Eq a, Num a) => String -> IO a -> IO ()
- throwSocketErrorIfMinus1Retry :: (Eq a, Num a) => String -> IO a -> IO a
- throwSocketErrorIfMinus1Retry_ :: (Eq a, Num a) => String -> IO a -> IO ()
- throwSocketErrorIfMinus1RetryMayBlock :: (Eq a, Num a) => String -> IO b -> IO a -> IO a
- throwSocketErrorWaitRead :: (Eq a, Num a) => Socket -> String -> IO a -> IO a
- throwSocketErrorWaitWrite :: (Eq a, Num a) => Socket -> String -> IO a -> IO a
- withSocketsDo :: IO a -> IO a
- zeroMemory :: Ptr a -> CSize -> IO ()
Documentation
type HostAddress = Word32 Source #
newtype PortNumber Source #
sizeOfSockAddr :: SockAddr -> Int Source #
sizeOfSockAddrByFamily :: Family -> Int Source #
AF_UNSPEC | unspecified |
AF_UNIX | local to host (pipes, portals |
AF_INET | internetwork: UDP, TCP, etc |
AF_INET6 | Internet Protocol version 6 |
AF_IMPLINK | arpanet imp addresses |
AF_PUP | pup protocols: e.g. BSP |
AF_CHAOS | mit CHAOS protocols |
AF_NS | XEROX NS protocols |
AF_NBS | nbs protocols |
AF_ECMA | european computer manufacturers |
AF_DATAKIT | datakit protocols |
AF_CCITT | CCITT protocols, X.25 etc |
AF_SNA | IBM SNA |
AF_DECnet | DECnet |
AF_DLI | Direct data link interface |
AF_LAT | LAT |
AF_HYLINK | NSC Hyperchannel |
AF_APPLETALK | Apple Talk |
AF_ROUTE | Internal Routing Protocol |
AF_NETBIOS | NetBios-style addresses |
AF_NIT | Network Interface Tap |
AF_802 | IEEE 802.2, also ISO 8802 |
AF_ISO | ISO protocols |
AF_OSI | umbrella of all families used by OSI |
AF_NETMAN | DNA Network Management |
AF_X25 | CCITT X.25 |
AF_AX25 | |
AF_OSINET | AFI |
AF_GOSSIP | US Government OSI |
AF_IPX | Novell Internet Protocol |
Pseudo_AF_XTP | eXpress Transfer Protocol (no AF) |
AF_CTF | Common Trace Facility |
AF_WAN | Wide Area Network protocols |
AF_SDL | SGI Data Link for DLPI |
AF_NETWARE | |
AF_NDD | |
AF_INTF | Debugging use only |
AF_COIP | connection-oriented IP, aka ST II |
AF_CNT | Computer Network Technology |
Pseudo_AF_RTIP | Help Identify RTIP packets |
Pseudo_AF_PIP | Help Identify PIP packets |
AF_SIP | Simple Internet Protocol |
AF_ISDN | Integrated Services Digital Network |
Pseudo_AF_KEY | Internal key-management function |
AF_NATM | native ATM access |
AF_ARP | (rev.) addr. res. prot. (RFC 826) |
Pseudo_AF_HDRCMPLT | Used by BPF to not rewrite hdrs in iface output |
AF_ENCAP | |
AF_LINK | Link layer interface |
AF_RAW | Link layer interface |
AF_RIF | raw interface |
AF_NETROM | Amateur radio NetROM |
AF_BRIDGE | multiprotocol bridge |
AF_ATMPVC | ATM PVCs |
AF_ROSE | Amateur Radio X.25 PLP |
AF_NETBEUI |
|
AF_SECURITY | Security callback pseudo AF |
AF_PACKET | Packet family |
AF_ASH | Ash |
AF_ECONET | Acorn Econet |
AF_ATMSVC | ATM SVCs |
AF_IRDA | IRDA sockets |
AF_PPPOX | PPPoX sockets |
AF_WANPIPE | Wanpipe API sockets |
AF_BLUETOOTH | bluetooth sockets |
throwSocketError :: String -> IO a Source #
throwSocketErrorIfMinus1_ Source #
:: (Eq a, Num a) | |
=> String | textual description of the location |
-> IO a | the |
-> IO () |
Throw an IOError
corresponding to the current socket error if
the IO action returns a result of -1
. Discards the result of the
IO action after error handling.
throwSocketErrorIfMinus1Retry Source #
:: (Eq a, Num a) | |
=> String | textual description of the location |
-> IO a | the |
-> IO a |
Throw an IOError
corresponding to the current socket error if
the IO action returns a result of -1
, but retries in case of an
interrupted operation.
throwSocketErrorIfMinus1Retry_ Source #
:: (Eq a, Num a) | |
=> String | textual description of the location |
-> IO a | the |
-> IO () |
Throw an IOError
corresponding to the current socket error if
the IO action returns a result of -1
, but retries in case of an
interrupted operation. Discards the result of the IO action after
error handling.
throwSocketErrorIfMinus1RetryMayBlock Source #
:: (Eq a, Num a) | |
=> String | textual description of the location |
-> IO b | action to execute before retrying if an immediate retry would block |
-> IO a | the |
-> IO a |
Throw an IOError
corresponding to the current socket error if
the IO action returns a result of -1
, but retries in case of an
interrupted operation. Checks for operations that would block and
executes an alternative action before retrying in that case.
throwSocketErrorWaitRead :: (Eq a, Num a) => Socket -> String -> IO a -> IO a Source #
Like throwSocketErrorIfMinus1Retry
, but if the action fails with
EWOULDBLOCK
or similar, wait for the socket to be read-ready,
and try again.
throwSocketErrorWaitWrite :: (Eq a, Num a) => Socket -> String -> IO a -> IO a Source #
Like throwSocketErrorIfMinus1Retry
, but if the action fails with
EWOULDBLOCK
or similar, wait for the socket to be write-ready,
and try again.
withSocketsDo :: IO a -> IO a Source #