Re: Sockets and Groups
Eugenio Flores <[email protected]> Mon, 20 Feb 2006 14:36:53 -0600 (CST)
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Well, I don't use any membership service. In both application use the same group advertisement to instantiate a peer object in order to use it as a parameter when I declare, both, JxtaServerSocket and the JxtaSocket.
Like this:
//Server socket side//////////////////////////
pg = myGroup.newGroup(advPG);
serverSocket = new JxtaServerSocket(pg, this.pipeAdv,10);
//JxtaSocket side////////////////////////////////////////////////
socket = new JxtaSocket(pg,
//no specific peerid
null,
pipeAdv,
//general TO: 30 seconds
30000,
// reliable connection
true);
Vanessa Williams <[email protected]> escribió:
Hi Eugenio,
interesting situation. Does the group you created have a null membership service? In other words, maybe everyone is automatically authorized for the group without having to log in? It's just a thought...
Vanessa
On 20-Feb-06, at 1:51 PM, Eugenio Flores wrote:
Hello Group.
I got a conceptual doubt about joining groups and JXTASockets:
I have two applications (You know that already), the first one has a JxtaServerSocket, but first it creates a group. Then I declare the JxtaServerSocket in the scope of this group, instead of doing it in the scope of the netGroup:
myGroup = PeerGroupFactory.newNetPeerGroup();
private PeerGroup pg = null;
private PeerGroupAdvertisement advPG = null;//I assign advPG when I look for the group advertisement locally
JxtaServerSocket serverSocket;
pg = myGroup.newGroup(advPG);
serverSocket = new JxtaServerSocket(pg, this.pipeAdv,10);
The other application has a JxtaSocket, but first it finds the group advertisement published by the first application, afterward it instantiates that group. Finally I create the JxtaSocket in the scope of this group.
socket = new JxtaSocket(pg,
//no specific peerid
null,
pipeAdv,
//general TO: 30 seconds
30000,
// reliable connection
true);
Both application work fine, they communicate with each other well, but the second application did not have to join the group created in the JXTAServer application. As I told you, I just instantiate! , in the second application, the group that it finds and creates the JxtaSocket with this group. So now I wonder in what kind of cases it is necessary to join a group.
Could you help me with this doubt?
Thanks a lot again.
---------------------------------
Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
--
Vanessa Williams
Oponia Networks
[email protected]
---------------------------------
Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx