Skip to main content

bidi pipe wont connect

2 replies [Last post]
andreamariotti
Offline
Joined: 2007-07-05
Points: 0

I have modified the bidipipe tutorial adding some classes so that I can create my own peer group, I can publish the bidipipe, and I can discover and correctly identify the advertisement for the bidipipe (I have checked the id) on the client side. The bidipipe on the server side is waiting for connection at this line

JxtaBiDiPipe bipipe = serverPipe.accept();

where the serverPipe object is a properly initialized pipe within my peergroup. At the client side nothing happens after this line (eventually I hit the connection timeout..)

pipe.connect(myPeerGroup,null, adv, 30000,this);

What am I missing, please? There must be something basic that is eluding me...

NOTE: I have debugged both codes and both threads are sitting at the above lines respectively.

I have tried using ADHOC and EDGE type networks (I have no relay in my network and I do not plan to go outside my subnet).

The non modified tutorial works on the same machine by the way...

Please help =)
-A

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12
Points: 0

It should work.

- Make sure both side of the pipe are bound with the same peergroup
- If this is run on two machines ensure both are on the same sub-net, otherwise you'll need a sub-group rendezvous
- turn on logging -Dnet.jxta.logging.Logging="FINE" and look for clues, or provide relevant logs

andreamariotti
Offline
Joined: 2007-07-05
Points: 0

Got it. The problem apparently is that I was using my peergroup instance to remotePublish and remoteDiscover. That was not working.
I am using the netPeerGroup object now and it works. So the question is what am I doing wrong when I create my own peerGroup but that is another story....
Though I am open to tips and trick on that too =)

Thanks!
-A