Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

NetReceive

Public Struct
std.Io.Operation.NetReceive
pub const NetReceive = struct

Fields

socket_handle: net.Socket.Handle
message_buffer: []net.IncomingMessage
data_buffer: []u8
flags: net.ReceiveFlags

Structs

Values

File

Io.zig:345
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
    pub const NetReceive = struct {
        socket_handle: net.Socket.Handle,
        message_buffer: []net.IncomingMessage,
        data_buffer: []u8,
        flags: net.ReceiveFlags,

        pub const Error = error{
            /// Insufficient memory or other resource internal to the operating system.
            SystemResources,
            /// Per-process limit on the number of open file descriptors has been reached.
            ProcessFdQuotaExceeded,
            /// System-wide limit on the total number of open files has been reached.
            SystemFdQuotaExceeded,
            /// Local end has been shut down on a connection-oriented socket, or
            /// the socket was never connected.
            SocketUnconnected,
            /// The socket type requires that message be sent atomically, and the
            /// size of the message to be sent made this impossible. The message
            /// was not transmitted, or was partially transmitted.
            MessageOversize,
            /// Network connection was unexpectedly closed by sender.
            ConnectionResetByPeer,
            /// The local network interface used to reach the destination is offline.
            NetworkDown,
            /// A connectionless packet was previously sent successfully,
            /// however, it was not received because no service is operating at
            /// the destination port of the transport on the remote system.
            /// This caused an ICMP port unreachable packet to be returned to
            /// the OS where it was queued up to be reported at the next call
            /// to send or receive on the bound socket.
            PortUnreachable,
            /// The remote peer did not respond to ongoing communication, causing the
            /// OS to abort the connection.
            ConnectionTimedOut,
        } || Io.UnexpectedError;

        pub const Result = struct { ?net.Socket.ReceiveError, usize };
    }