Idris2Doc : System.Posix.Socket

System.Posix.Socket

(source)

Reexports

importpublic System.Posix.Socket.Struct
importpublic System.Posix.Socket.Types
importpublic System.Posix.File.ReadRes

Definitions

socket : HasErrnoes=>EIO1f=> (d : Domain) ->SockType->fes (Socketd)
  Creates a new endpoint for communication returning a file descriptor
referring to that endpoint.

Visibility: export
listen : HasErrnoes=>EIO1f=>Socketd->Bits32->fes ()
  Listen for connections on a socket.

This marks the socket as the *passive* part that will then wait
for incoming connections using calles to `accept`.

Visibility: export
accept : HasErrnoes=>EIO1f=>Socketd->fes (Socketd)
  Accept connections on a socket.

Incoming connections are returned as new `Socket` file descriptors.

Visibility: export
bind_ : HasErrnoes=>EIO1f=>Socketd->Sockaddrd->fes ()
  Binds a socket to the given address.

Visibility: export
connect_ : HasErrnoes=>EIO1f=>Socketd->Sockaddrd->fes ()
  Connects a socket to the given address.

Visibility: export
bind : HasErrnoes=>EIO1f=>Socketd->Addrd->fes ()
  Convenience alias for `bind_`.

Visibility: export
connect : HasErrnoes=>EIO1f=>Socketd->Addrd->fes ()
  Convenience alias for `connect_`.

Visibility: export
recvPtr : HasErrnoes=>EIO1f=>Socketd-> (0r : Type) ->FromPtrr=>CPtr->SockFlags->fes (ReadResr)
  Reads at most `n` bytes from a file into an allocated pointer.

Visibility: export
recvFromPtr : HasErrnoes=>EIO1f=>Socketd-> (0r : Type) ->FromPtrr=>CPtr->SockFlags->Sockaddrd->fesr
  Reads at most `n` bytes from a file into an allocated pointer.

Visibility: export
recv : HasErrnoes=>EIO1f=>Socketd-> (0r : Type) ->FromBufr=>Bits32->SockFlags->fes (ReadResr)
  Reads at most `n` bytes from a file into a bytestring.

Visibility: export
recvFrom : HasErrnoes=>EIO1f=>Socketd-> (0r : Type) ->FromBufr=>Bits32->SockFlags->Sockaddrd->fesr
  Reads at most `n` bytes from a socket into a bytestring

Visibility: export
sendto : HasErrnoes=>EIO1f=>ToBufr=>Socketd->r->SockFlags->Sockaddrd->fesBits32
Visibility: export
getpeername_ : HasErrnoes=>EIO1f=>Socketd->Sockaddrd->fes ()
  Returns the address of the peer connected to a socket.
The given Sockaddr buffer will be filled with the peer address.

Visibility: export
getsockname_ : HasErrnoes=>EIO1f=>Socketd->Sockaddrd->fes ()
  Returns the current address to which the socket is bound.
The given Sockaddr buffer will be filled with the socket's address.

Visibility: export
getpeername : HasErrnoes=>EIO1f=>Socketd->fes (Addrd)
  Returns the address of the peer connected to a socket.

Visibility: export
getsockname : HasErrnoes=>EIO1f=>Socketd->fes (Addrd)
Visibility: export
setNoDelay : HasErrnoes=>EIO1f=>Socketd->Bool->fes ()
  Enables or disables the Nagle algorithm.

Visibility: export
setReuseAddress : HasErrnoes=>EIO1f=>Socketd->Bool->fes ()
  Allows binding to an address/port before the expiry of the TIME_WAIT state.

Visibility: export
setLinger : HasErrnoes=>EIO1f=>Socketd->MaybeBits32->fes ()
  Sets the linger option for a socket.

`Nothing` disables lingering (close returns immediately).
`Just 0` enables a hard close (RST sent, data discarded).
`Just n` for n > 0 waits up to n seconds for data to be sent before closing.

Visibility: export