Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class SockAddr a where
- sockAddrToByteArray :: a -> ByteArray
- byteArrayToSockAddr :: ByteArray -> Maybe a
- isByteArrayThisAddr :: ByteArray -> Bool
- sockAddrSize :: a -> Int
- newtype Addr = Addr {}
- mkAddr :: ByteArray -> Addr
- newSockAddrStorage :: PrimMonad m => m (MutableByteArray (PrimState m))
- data SockAddrNull = SockAddrNull
- newtype SockAddrUn = SockAddrUn FilePath
- data SockAddrIn = SockAddrIn {}
- data SockAddrIn6 = SockAddrIn6 {
- sin6Port :: !Port
- sin6Flowinfo :: !Word32
- sin6Addr :: !In6Addr
- sin6ScopeId :: !Word32
Documentation
class SockAddr a where Source #
sockAddrToByteArray :: a -> ByteArray Source #
Convert a socket address to its C equivalent
byteArrayToSockAddr :: ByteArray -> Maybe a Source #
Convert a socket address from its C equivalent
isByteArrayThisAddr :: ByteArray -> Bool Source #
Check if this bytearray contain a socket address of this type
sockAddrSize :: a -> Int Source #
Find the required number of bytes to store the C struct
Instances
SockAddr SockAddrIn Source # | |
Defined in Netw.SockAddr | |
SockAddr SockAddrIn6 Source # | |
Defined in Netw.SockAddr | |
SockAddr SockAddrNull Source # | |
Defined in Netw.SockAddr | |
SockAddr SockAddrUn Source # | |
Defined in Netw.SockAddr |
A type that represent some socket address
newSockAddrStorage :: PrimMonad m => m (MutableByteArray (PrimState m)) Source #
data SockAddrNull Source #
A null socket address. Equivalent to not specifying a socket address.
Instances
SockAddr SockAddrNull Source # | |
Defined in Netw.SockAddr |
newtype SockAddrUn Source #
UNIX Socket address
Instances
Show SockAddrUn Source # | |
Defined in Netw.SockAddr showsPrec :: Int -> SockAddrUn -> ShowS # show :: SockAddrUn -> String # showList :: [SockAddrUn] -> ShowS # | |
Eq SockAddrUn Source # | |
Defined in Netw.SockAddr (==) :: SockAddrUn -> SockAddrUn -> Bool # (/=) :: SockAddrUn -> SockAddrUn -> Bool # | |
SockAddr SockAddrUn Source # | |
Defined in Netw.SockAddr |
data SockAddrIn Source #
IPv4 socket address
Instances
SockAddr SockAddrIn Source # | |
Defined in Netw.SockAddr |
data SockAddrIn6 Source #
IPv6 socket address
SockAddrIn6 | |
|
Instances
SockAddr SockAddrIn6 Source # | |
Defined in Netw.SockAddr |