Client Port Number?

  • Thread starter Thread starter News Group
  • Start date Start date
N

News Group

Hi,

Is it possible to specify what Client Port Number IE will use?

How is the Client Port Number chosen? Will it always be within a certain
range?

Any help appreciated.

Colin.
 
News Group said:
Hi,

Is it possible to specify what Client Port Number IE will use?

How is the Client Port Number chosen? Will it always be within a
certain
range?

Any help appreciated.

Colin.


I'll assume you mean the listening port on the host to which you want to
connect and presumably has a process listening on that port.

URL syntax (for an HTTP site):

http://[hostname.]domain.tld[.cctld][:port]

If you want to specify a port other than the default one use for a
protocol, include it in the URL. For HTTP, the default port is 80.
Some users running web servers will use other non-standard ports, like
8080, so use something like:

http://www.theirdomain.com:8080

The full syntax for URLs depending on which transfer protocol is used;
see ftp://ftp.rfc-editor.org/in-notes/rfc1738.txt. Note that section
3.1 only describes the generic syntax but later sections are amendments
and override that generic syntax. Lots of users thought:

http://username:[email protected]

was a valid syntax for HTTP but it is not. It got used for quite
awhile. When Microsoft cleaned up IE to obey the RFC, users bitched
they lost the ability to specify their login credentials in the URL, but
it never was valid HTTP syntax. Read section 3.3 on what is valid the
valid URL syntax when using HTTP.
 
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.
 
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
 
Back
Top