What is hops in HttpClient?

256 Views Asked by At

I'm learning about HttpClient, I can't understand hops, is it a proxy?

HttpClient is capable of establishing connections to the target host either directly or via a route that may involve multiple intermediate connections - also referred to as hops.

2

There are 2 best solutions below

0
Steffen Ullrich On

This refers to using multiple proxies. It is even explained in the same paragraph, two sentences later:

The use of multiple intermediate proxies to tunnel connections to the target host is referred to as proxy chaining.

0
Karthik Balaguru On

In general, the direct route shall have one hop. There shall be two hops if the route is through a proxy. There shall be n+1 hops if the route is through a chain of n proxies.

The getHopCount shall return the number of hops in a route which shall help in giving further understanding of the same .