Zig 0.17.0-dev (Split by item)

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 library itself.

SOCK

linux.SOCK
pub const SOCK = struct

File

lib/std/os/linux.zig:4666

Code

pub const SOCK = struct {
    pub const STREAM = if (is_mips) 2 else 1;
    pub const DGRAM = if (is_mips) 1 else 2;
    pub const RAW = 3;
    pub const RDM = 4;
    pub const SEQPACKET = 5;
    pub const DCCP = 6;
    pub const PACKET = 10;
    pub const CLOEXEC = if (is_sparc)
        0o20000000
    else if (native_arch == .alpha)
        0o10000000
    else
        0o2000000;
    pub const NONBLOCK = if (is_mips)
        0o200
    else if (is_sparc)
        0o40000
    else if (is_hppa or native_arch == .alpha)
        0x40000000
    else
        0o4000;
}