Lines Matching defs:port
471 sin_port: addr.port().to_be(), // network byte order
484 sin6_port: addr.port().to_be(), // network byte order
495 pub fn new(ip: IpAddr, port: u16) -> InetAddr {
500 sin_port: port.to_be(),
508 sin6_port: port.to_be(),
523 /// Gets the port number associated with this socket address
524 pub const fn port(&self) -> u16 {
536 self.port())),
540 self.port(),
556 InetAddr::V4(_) => write!(f, "{}:{}", self.ip(), self.port()),
557 InetAddr::V6(_) => write!(f, "[{}]:{}", self.ip(), self.port()),
1254 /// Creates a new socket address from IPv4 octets and a port number.
1255 pub fn new(a: u8, b: u8, c: u8, d: u8, port: u16) -> Self {
1268 sin_port: u16::to_be(port),
1276 /// Returns the port number associated with this socket address, in native
1278 pub const fn port(&self) -> u16 {
1317 let port = u16::from_be(self.0.sin_port);
1325 port
1346 sin_port: addr.port().to_be(), // network byte order
1390 /// Returns the port number associated with this socket address, in native
1392 pub const fn port(&self) -> u16 {
1439 self.port(),
1464 sin6_port: addr.port().to_be(), // network byte order
2062 pub fn new_vsock(cid: u32, port: u32) -> SockAddr {
2063 SockAddr::Vsock(VsockAddr::new(cid, port))
2350 /// Construct a new socket address from its port ID and multicast groups
2361 /// Return the socket's port ID.
2922 /// 32-bit Context Identifier (CID) and a 32-bit port number.
2925 pub fn new(cid: u32, port: u32) -> VsockAddr {
2929 addr.svm_port = port;
2940 pub fn port(&self) -> u32 {
2947 write!(f, "cid: {} port: {}", self.cid(), self.port())