What port does httpclient use?

There are always two ports involved in a connection – one at the server, and another at the client.

The server-side port is specified (and is known to the client) via the HTTP URL (the default is 80 for HTTP connections and 443 for HTTPS) and is specified after the hostname using hostname:port notation.

On the client-side, things are a bit more interesting. Clients open a temporary or dynamic port that lasts only as long as the connection is made. Client-side ports are always opened on the dynamic range (49152 through 65535) reserved for them by IANA, which is usually enforced on the newer operating systems (I’m not sure if Windows XP follows the IANA directive to the letter, but Vista and Windows Server 2008 happen to).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)