开发者

Accessing socket data in HTMLUNIT

开发者 https://www.devze.com 2023-03-24 04:26 出处:网络
In and normal Java Socket class you have the 开发者_如何学Cmethod public int getLocalPort() to find out what your source port is. Does anyone know how to access this information with HTMLUNIT? curren

In and normal Java Socket class you have the 开发者_如何学Cmethod public int getLocalPort() to find out what your source port is. Does anyone know how to access this information with HTMLUNIT?


currentPage.getUrl().getPort();

gives the port number of the URL being visited if that is what you are looking for.

0

精彩评论

暂无评论...
验证码 换一张
取 消