format
Function parameters
Parameters
Type definitions in this namespace
Types
Functions in this namespace
Functions
- tcpConnectToHost
- All memory allocated with `allocator` will be freed before this function returns.
- getAddressList
- Call `AddressList.deinit` on the result.
Error sets in this namespace
Error Sets
= switch (native_os) { .windows => builtin.os.version_range.windows.isAtLeast(.win10_rs4) orelse false, .wasi => false, else => true, }
Values
- has_unix_sockets
- = switch (native_os) { .windows => builtin.os.version_range.windows.isAtLeast(.win10_rs4) orelse false, .wasi => false, else => true, }
Source
Implementation
pub fn format(self: Address, w: *Io.Writer) Io.Writer.Error!void {
switch (self.any.family) {
posix.AF.INET => try self.in.format(w),
posix.AF.INET6 => try self.in6.format(w),
posix.AF.UNIX => {
if (!has_unix_sockets) unreachable;
try w.writeAll(std.mem.sliceTo(&self.un.path, 0));
},
else => unreachable,
}
}