Posted by ariel_ro
on April 24, 2010 at 9:23 AM PDT
My question is very simple but it doesn't seem to work for me.
I want to send information using JxtaSocket to a specific peer.
Here's what I got from the javadoc:
public JxtaSocket(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAd,int timeout)
Create a JxtaSocket to any peer listening on pipeAdv this attempts establish a connection to specified pipe within a context of group and within timeout specified
After implementing that I got a very strange warning:
WARNING: Connection response from wrong peer!
After I receive this, I get a SocketTimeoutException and nothing happens.
It is more than obvious that the above warning is not right since the two peerIds are identic.
Furthermore, I tried connect(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAd, int timeout) method but that doesn't seem to work. I don't get the above exception but I receive a file on more than one host, not only on the one I expect.
I'm using JXSE 2.5
Any help will be highly appreciated!
Message was edited by: ariel_ro