Arya
Arya

Reputation: 8995

Binding Jetty HttpClient to Network Interface Card

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?

Upvotes: 1

Views: 427

Answers (1)

Joakim Erdfelt
Joakim Erdfelt

Reputation: 49515

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

Upvotes: 2

Related Questions