port number
A number from 0 to 65535 that picks which program on a machine gets a network message.
A port distinguishes services on one host; an (IP address, port) pair is a SocketAddr. Binding port 0 asks the OS to choose a free one.
Examples
TcpListener::bind("127.0.0.1:0")asks the OS for any free port; binding a port that is already taken fails withErrorKind::AddrInUse.In
"192.168.1.20:8080".parse::<SocketAddr>(),.ip()is192.168.1.20and.port()is8080.
See also