It's rare when you get the same port on client and server. The server has to have a fixed port so that the client software can connect to it; for example port 80 on a webserver or port 25 for a ftp server. When the client opens a socket to the server, it will be assigned an available port from the operating system. This client port is where the response is sent from the server - say the html from a web server. [ August 06, 2004: Message edited by: Rovas Kram ]
That's true. The real genic happened in the inetraction between cl-server is this
The client Sends a request to an application running on some fixed port(say 80 for http req ) at server(an ip address).
The server gets the request and it sends the request to a random port(say port number 1000) on server for further interactions.
Now the server's port 80 is free and waiting for another requests.The random port is doing all the interactions with the client and it is the means by which the server knows and interacts with the client.