pub fn listen(address: *const IpAddress, io: Io, options: ListenOptions) ListenError!Server address: *const IpAddressio: Iooptions: ListenOptions248
249
250
251
252
253
254
255
256 pub fn listen(address: *const IpAddress, io: Io, options: ListenOptions) ListenError!Server {
return .{
.socket = try io.vtable.netListenIp(io.userdata, address, options),
.options = if (Server.AcceptOptions != void) .{
.mode = options.mode,
.protocol = options.protocol,
},
};
}
Waits for a TCP connection. When using this API,
binddoes not need to be called. The returnedServerhas an openstream.