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 standard library.
std › os › linux › setsockopt Public Function setsockopt Doc Source Public Function std.os.linux.setsockopt
pub fn setsockopt (fd : fd_t , level : i32 , optname : u32 , optval : [*]const u8 , optlen : socklen_t ) usize Params fd : fd_t level : i32 optname : u32 optval : [*]const u8 optlen : socklen_t File os/linux.zig: 2521
2521
2522
2523
2524
2525
2526 pub fn setsockopt (fd : fd_t , level : i32 , optname : u32 , optval : [*]const u8 , optlen : socklen_t ) usize {
if (native_arch == .x86 ) {
return socketcall (SC .setsockopt , &[5 ]usize { @as (u32 , @bitCast (fd )), @as (usize , @bitCast (@as (isize , level ))), optname , @intFromPtr (optval ), @as (usize , @intCast (optlen )) });
}
return syscall5 (.setsockopt , @as (u32 , @bitCast (fd )), @as (usize , @bitCast (@as (isize , level ))), optname , @intFromPtr (optval ), @as (usize , @intCast (optlen )));
}