Function getPort [src]

Returns the port in native endian. Asserts that the address is ip4 or ip6.

Prototype

pub fn getPort(self: Address) u16

Parameters

self: Address

Source

pub fn getPort(self: Address) u16 { return switch (self.any.family) { posix.AF.INET => self.in.getPort(), posix.AF.INET6 => self.in6.getPort(), else => unreachable, }; }