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 › Io › Threaded › socketOptionAfd Private Function socketOptionAfd Doc Source Private Function std.Io.Threaded.socketOptionAfd
fn socketOptionAfd (socket : net .Socket .Handle , mode : windows .AFD .SOCKOPT_INFO .Mode , level : i32 , opt_name : u32 , opt_val : []u8 ) !void Params socket : net .Socket .Handle mode : windows .AFD .SOCKOPT_INFO .Mode level : i32 opt_name : u32 opt_val : []u8 File Io/Threaded.zig: 12333
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350 fn socketOptionAfd (socket : net .Socket .Handle , mode : windows .AFD .SOCKOPT_INFO .Mode , level : i32 , opt_name : u32 , opt_val : []u8 ) !void {
switch ((try deviceIoControl (&.{
.file = .{ .handle = socket , .flags = .{ .nonblocking = true } },
.code = windows .IOCTL .AFD .SOCKOPT ,
.in = @ptrCast (&windows .AFD .SOCKOPT_INFO {
.mode = mode ,
.level = level ,
.optname = opt_name ,
.optval = opt_val .ptr ,
.optlen = opt_val .len ,
}),
})).u .Status ) {
.SUCCESS => return ,
.CANCELLED => unreachable ,
.INSUFFICIENT_RESOURCES => return error .SystemResources ,
else => |status | return windows .unexpectedStatus (status ),
}
}