Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JXTA beginning  RSS feed

 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well,
I was trying out a program they had posted in the site for a simple listerner and sender of messages using JXTA.
Well, I got caught too much in it I guess that I didnt know how to debug when there was a problem..
the Problem was that the listerner was listening, but the sender on run gave a address already bound exception.
This was quickly resolved by me, by giving a different port number.
Now, the sender sends the message but the listener still cant seem to get it..

Yup, I was confused.. then it struck me that the sender must have the endpoint for the listener, ie. the pipe to write into.. and since it didnt have it it was writing god knows where, I assumed..
so I quickly copied the .adv ( advertisement ) and pasted it in the path of the sender and Voila!! the program works!!
now, my question,
Over the network, in real time, how does this happen??
DId I have to copy and paste a physical file so that the PipeAdvertisement Object could see the FIleInputStream handle and so get the file??
Is there a better way??
can somebody explain the working for me??
Regds
Lupo
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds interesting - where did you find this example?
Bill
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on jxta.org. examples
The code is here
Regds
Lupo
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!