Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Snapshot · Oct 24, 2026 · Frozen documentation

DatagramReceipt

Owns metadata for exactly one consumed UDP packet. Count is bytes copied into the supplied buffer. IsTruncated marks discarded unread tail; count is not the original packet size. Sender is an independent numeric endpoint. An empty packet has zero count and is not stream EOF. Immutable copied metadata retains neither buffer nor socket; readonly access is thread safe while this value is not replaced/moved.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.net

import std.net;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

DatagramReceipt

pub struct DatagramReceipt

Owns metadata for exactly one consumed UDP packet. Count is bytes copied into the supplied buffer. IsTruncated marks discarded unread tail; count is not the original packet size. Sender is an independent numeric endpoint. An empty packet has zero count and is not stream EOF. Immutable copied metadata retains neither buffer nor socket; readonly access is thread safe while this value is not replaced/moved.

pub Count: usize

pub Count: usize

Observes bytes actually copied, not original packet length. Return: Bounded copied prefix count, possibly zero.

pub Sender: Endpoint

pub Sender: Endpoint

Copies the numeric sender without retaining the receiving socket. Return: Independent endpoint; no allocation, resolution or I/O.

pub IsTruncated: bool

pub IsTruncated: bool

Observes whether unread packet tail was consumed and discarded. Return: True for truncation; false includes a complete empty packet.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library