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 › deferAcceptAfd Private Function deferAcceptAfd Doc Source Private Function std.Io.Threaded.deferAcceptAfd
fn deferAcceptAfd (t : *Threaded , listen_handle : net .Socket .Handle , info : windows .AFD .LISTEN_RESPONSE_INFO ) void Params File Io/Threaded.zig: 12815
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832 fn deferAcceptAfd (t : *Threaded , listen_handle : net .Socket .Handle , info : windows .AFD .LISTEN_RESPONSE_INFO ) void {
const cancel_protection = swapCancelProtection (t , .blocked );
defer _ = swapCancelProtection (t , cancel_protection );
switch ((deviceIoControl (&.{
.file = .{ .handle = listen_handle , .flags = .{ .nonblocking = true } },
.code = windows .IOCTL .AFD .DEFER_ACCEPT ,
.in = @ptrCast (&windows .AFD .DEFER_ACCEPT_INFO {
.Sequence = info .Sequence ,
.Reject = .FALSE ,
}),
}) catch |err | switch (err ) {
error .Canceled => unreachable , // blocked
}).u .Status ) {
.SUCCESS => {},
.CANCELLED => unreachable ,
else => |status | windows .unexpectedStatus (status ) catch {},
}
}