Re: Sockets and Groups
Eugenio Flores <[email protected]> Mon, 20 Feb 2006 22:15:33 -0600 (CST)
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Vanessa, first of all, thank you for your answer. You are right, I created the group advertisement (advPG) from the all purpose peer group implementation . So, do you recomend to use another way to create the advPG? I used that one because it's the one I have seen in the examples. --- Vanessa Williams <[email protected]> escribió: > Sorry Eugenio, maybe I wasn't clear. I meant, what > is the membership > service being used by the group? If you created the > group > advertisement (advPG) from the all purpose peer > group implementation > advertisement, then I think it has a null membership > service by > default. (Perhaps you could send the peer group > advertisement so we > can see for sure.) I'm guessing that's why the peers > can communicate > without having to "join" the group explicitly. Maybe > someone else > knows for sure... > > Vanessa > > On 20-Feb-06, at 3:36 PM, Eugenio Flores wrote: > > > > > > > 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 t he 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); > >> > >> Bo th 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 > > -- > Vanessa Williams > Oponia Networks > [email protected] > > > > ___________________________________________________________ Do You Yahoo!? La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx