Binding Jetty HttpClient to Network Interface Card

405 Views Asked by At

I will be using Jetty HttpClient on machines with two Network Interface Cards, I want the ability to force (bind) Jetty HttpClient to one of the NICs, would this be possible with Jetty HttpClient?

1

There are 1 best solutions below

3
Joakim Erdfelt On BEST ANSWER

Use HttpClient.setBindAddress(java.net.SocketAddress) to set the address of the NIC you want to bind the output requests against.