News Group said:
Hi,
Thanks for the reply - I want to know the Client Port Number and how
(if
possible) to change it.
I know that IE connects to 80 or 8080 on the relevant server, but what
Port
Number does IE assign to itself as the Client?
Colin.
That's a random, or "ethereal", port number somewhere above 1023 as part
of the socket created for that client-server connection via TCP. It
gets picked at random. I don't know if you have any means of regulating
what ethereal port number gets used. Sounds like you need to pick the
brains of those in a programmer's newsgroup that build network-enabled
applications, not the brains of a those in a user newsgroup.
I don't think the client or server application gets to pick the ethereal
port. The OS does that. On the client side, it assigns an ethereal
port number for use by the application, notifies the server via the
current connection as to which remote port it will thereafter use to
talk to the client, and then notifies the client the local port on which
it should listen. Same thing happens at the server end. Ooops, looks
like the port switch happens first at the server and then at the client.
The switch to a different port is needed, especially by the server, so
it can accept more connection requests from other clients.
RFC 147 - Definition of a socket
http://www.faqs.org/rfcs/rfc147.html
What Is a Socket?
http://java.sun.com/docs/books/tutorial/networking/sockets/definition.html