Question: How does the networked application running on a server know the client IP address and the port number to reply to in response to a
How does the networked application running on a server know the client IP address and the port number to reply to in response to a received datagram?
A The application code at the server determines client IP address and port # from the initial segment sent by client, and must explicitly specify these values when sending into a socket back to that client
The server will query the DNS to learn the IP address of the client.
The server will know the port number being used by the client since all services have a wellknown port number.
As the result of performing the accept statement, the server has created a new socket that is bound to that
D specific client, and so sending into this new socket without explicitly specifying the client IP address and port number is sufficient to ensure that the sent data will be addressed to the correct client.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
