Sending/receiving packets on networked computers with different UDP ports?

For a UDP or TCP endpoint an address and port must be set. The initiator must know what address-port to send to. The receiver can use the getpeername() call to determine the address-port combination of the sender and then use this information to build up the address structure for a reply message.

The two do not need to use the same port number.

No. There is no requirement for servers and clients to use the same port numbers; indeed this is typically infeasible. But each sender has to know the port number of the desired receiver.

In the case of a response, the source address and port came in with the request. In the case of a request, the client has to already know the server ip:port, somehow.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions