| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Socket.Discard
Synopsis
- data PeerlessSlab = PeerlessSlab {}
- newPeerlessSlab :: Int -> Int -> IO PeerlessSlab
- freezePeerlessSlab :: PeerlessSlab -> Int -> IO (UnliftedArray ByteArray)
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
| |
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.