Network.Socket

# Types

data Socket

data Family

isSupportedFamily

data SocketType

isSupportedSocketType

data SockAddr

isSupportedSockAddr

data SocketStatus

type HostAddress

hostAddressToTuple

tupleToHostAddress

type HostAddress6

hostAddress6ToTuple

tupleToHostAddress6

type FlowInfo

type ScopeID

data ShutdownCmd

type ProtocolNumber

defaultProtocol

data PortNumber

# Address operations

type HostName

type ServiceName

data AddrInfo

data AddrInfoFlag

addrInfoFlagImplemented

defaultHints

getAddrInfo

data NameInfoFlag

getNameInfo

# Socket operations

socket

socketPair

connect

bind

listen

accept

getPeerName

getSocketName

getPeerCred

socketPort

socketToHandle

## Sending and receiving data

### Sending and receiving with String

send

sendTo

recv

recvFrom

recvLen

### Sending and receiving with a buffer

sendBuf

recvBuf

sendBufTo

recvBufFrom

## Misc

inet_addr

inet_ntoa

shutdown

close

## Predicates on sockets

isConnected

isBound

isListening

isReadable

isWritable

# Socket options

data SocketOption

isSupportedSocketOption

getSocketOption

setSocketOption

# File descriptor transmission

sendFd

recvFd

# Special constants

aNY_PORT

iNADDR_ANY

iN6ADDR_ANY

sOMAXCONN

sOL_SOCKET

sCM_RIGHTS

maxListenQueue

# Initialisation

withSocketsDo

# Very low level operations

fdSocket

mkSocket

setNonBlockIfNeeded

# Deprecated aliases

bindSocket

sClose

sIsConnected

sIsBound

sIsListening

sIsReadable

sIsWritable

# Internal

packFamily

unpackFamily

packSocketType