Problem testing a p2p app at home
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, May 1, 2002 07:36 AM

I am trying to test a p2p app at home, My internet access is dialup .. I am trying to create an app that communicates over sockets, i was hoping that i could start 2 versions of the app, and have one app resolve the address as 127.0.0.1 , then start up the app again, dial up , resolve that ip adresss and connect the two apps but i was getting a java.net.BindException: Address in use: JVM_Bind I have a listener and a browser in my app, being a p2p app, both are active in any one instance of the application. The listener has a serverSocket that listens on port 5000, The client has a socket that tries to connect to the server socket on port 5000, i got around the JVM_Bind problem by :    More>>

I am trying to test a p2p app at home,
My internet access is dialup ..


I am trying to create an app that communicates over sockets, i was hoping that i could start 2 versions of the app, and have one app resolve the address as 127.0.0.1 , then start up the app again, dial up , resolve that ip adresss and connect the two apps but i was getting a java.net.BindException: Address in use: JVM_Bind


I have a listener and a browser in my app, being a p2p app, both are active in any one instance of the application.


The listener has a serverSocket that listens on port 5000,
The client has a socket that tries to connect to the server socket on port 5000, i got around the JVM_Bind problem by :

1.) Starting a new app with the listener included - ip = localhost


2.) Take out the listener code, connect to the web and start a new version of the app - ip address = isp's choice


3.) Try to make a connection between app2 and app1


The problem is i'm getting


"java.net.SocketException: network subsystem has failed: no further information"


Is it not possible to connect from an isp ip address eg 194.165.169.5 to 127.0.01 on the same computer using java sockets ? or am i doing something wrong ?


Does anyone know of a workaround for the address already in use problem ?

Thanks for the help , much appreciated

Michael

   <<Less

Re: Problem testing a p2p app at home

Posted By:   Richard_Martin  
Posted On:   Wednesday, May 1, 2002 08:08 AM

No it is most certainly not possible! 127.0.0.1 resolves to the same machine as your 194.165.169.5. You are trying to run both servers on the same port.

You cannot have more than one application listening on the same port. Obviously you can have an application listening on a port and then connect to that port from another application (Otherwise there wouldn't be much point in being able to listen). Is this what you are trying achieve?
About | Sitemap | Contact