Clients must initiate connections with the application servers. Allowing the operating system to select the client port alleviates problems that arise when two clients request the same port number.
Many multimedia applications use multiple sockets.
They send commands to one socket and receive data from other sockets. When the operating system selects the ports for the receiving sockets, the application must communicate the port to the server. The application can use the getsockname function to retrieve the operating system assigned port number. Connecting TCP sockets must allow the connect function to bind the socket. This guideline pertains to the ftp protocol and other similar protocols that pass the client IP address as part of the protocol.