Skip to main content

how to configure the NetworkConfigurator?

1 reply [Last post]
ryanblues
Offline
Joined: 2008-10-09

Hi, there

I'm testing the JXTA by using tutorial discovery example. I'm testing this example on two PCs, one acts as DiscoveryClient while the other acts as DiscoveryServer, however, DiscoveryClient are not unable to receive response messages from DiscoveryServer.

Currently, I think it's related to the Port issue. Because I do this testing in my project lab, naturally, the port would only open by request to my lab administrator. I think the default port the JXTA use to listen is 9701 something, do there anyone know how to change this port to 2000? (that's the only port I can use). I have searched for API in NetworkConfigurator, but there are so many methods to change the port, which one is exactly one I need?

Thanks a lot!

Ryan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jtanago
Offline
Joined: 2008-06-18

Hi
You should use this:

NetworkConfigurator MyNetworkConfigurator = MyNetworkManager.getConfigurator();
MyNetworkConfigurator.setTcpPort(2000);
/****** or if you want a http connection *******/
MyNetworkConfigurator.setHttpPort(2000);

Best regards,
Javier