netw-0.1.1.0: Binding to C socket API operating on bytearrays.
Safe HaskellSafe-Inferred
LanguageGHC2021

Netw.SockAddr

Description

 
Synopsis

Documentation

class SockAddr a where Source #

Minimal complete definition

sockAddrToByteArray, byteArrayToSockAddr

Methods

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

newtype Addr Source #

A type that represent some socket address

Constructors

Addr 

Fields

data SockAddrNull Source #

A null socket address. Equivalent to not specifying a socket address.

Constructors

SockAddrNull 

newtype SockAddrUn Source #

UNIX Socket address

Constructors

SockAddrUn FilePath