Tyrus WebSockets (Java) - how to set client local

2020-08-09 17:02发布

Is there a way to specify the local ip-address and port when using WebSockets (Tyrus)?

I'm looking for the same thing you can do with the full 4 parameters constructor of Socket

EDIT:

I have found that the low level Grizzly TCPNIOTransport does have a connect() method with local-address, but I don't know how to make a Tyrus Client use it.

1条回答
相关推荐>>
2楼-- · 2020-08-09 17:35

The GrizzlyClientSocket never calls the transport connect() method with the local-address parameters.

You'll need to ask a feature request from Tyrus project, or write your own implementation of GrizzlyClientSocket, which you'll need to call from your own implementation of a GrizzlyClientContainer

查看更多
登录 后发表回答