sockets-0.4.0.0: High-level network sockets

Safe HaskellNone
LanguageHaskell2010

Socket.Discard

Synopsis

Documentation

data PeerlessSlab Source #

A slab of memory for bulk datagram ingest (via recvmmsg). Slabs are not safe for concurrent access. This variant does not have space for the peer addresses.

Constructors

PeerlessSlab 

Fields

newPeerlessSlab Source #

Arguments

:: Int

maximum datagrams

-> Int

maximum size of individual datagram

-> IO PeerlessSlab 

Allocate a slab that is used to receive multiple datagrams at the same time without receiving any information about the peer.

freezePeerlessSlab :: PeerlessSlab -> Int -> IO (UnliftedArray ByteArray) Source #

Freeze the specified number of messages in-place and return them Replaces all of the frozen messages with tombstones so that new buffers can be allocated before the next reception. End users should not need this function.