LocalNetworkDiscovery.clientAdded problem

59 views
Skip to first unread message

Franto

unread,
Nov 8, 2011, 2:28:55 PM11/8/11
to Cocoon P2P
Hi all,

I would like to ask if somone is experiencing same problem as I did.
On LocalNetworkDiscovery.clientAdded event, I have always
event.client.clientName null. There is no difference if local client
is added or client using Cirrus.

I want to use it to display chat message evt.client.clientName+"
joined the chatroom"

Thank you
Franto

Dirk Eismann

unread,
Nov 15, 2011, 3:56:53 AM11/15/11
to Cocoon P2P
I guess you have set the clientName property on the
LocalNetworkDiscovery instance?

Dirk.

franto

unread,
Nov 15, 2011, 5:55:15 AM11/15/11
to cocoo...@googlegroups.com
Hi Dirk,

yes, I've set. This is the mobile application, so I've set clientName
in viewActivate handler. Maybe it's problem that I set clientName
late? Is it important when I set clientName?


--
Franto Kormanak (fra...@flexets.com)
Owner & Senior RIA Developer
at Flexets (http://www.flexets.com)

profile: http://www.linkedin.com/in/franto
skype: franto.kormanak

2011/11/15 Dirk Eismann <bor...@googlemail.com>:

Dirk Eismann

unread,
Nov 15, 2011, 6:54:58 AM11/15/11
to cocoo...@googlegroups.com
Hi Franto,

strange. I just had a quick look at the codebase and it definitely should announce changes to the clientName property correctly. 

I will try to figure out why it's not working. 

Dirk.


2011/11/15 franto <korm...@gmail.com>

franto

unread,
Nov 15, 2011, 7:01:32 AM11/15/11
to cocoo...@googlegroups.com
Hi Dirk,

thank you for your effort, let me know, if you will find the problem.
If I can help you somehow, let me know.

Dirk Eismann

unread,
Nov 16, 2011, 5:30:56 AM11/16/11
to Cocoon P2P
ok - I just found that the "null" clientName is the correct
behaviour.

When LocalNetworkDiscovery dispatches the clientAdded event, it
actually picks up a "low level" event from the NetGroup which just
indicates that a new client connected to the network. But at that
time, the new client has not yet send his clientName (this is more an
architectural problem as you cannot send arbitrary data upon
connecting to a NetGroup)

So if you listen for the ClientEvent.CLIENT_UPDATE event, you will get
notification when the real clientName of a client has been received.

Cheers,
Dirk.

On 15 Nov., 13:01, franto <korma...@gmail.com> wrote:
> Hi Dirk,
>
> thank you for your effort, let me know, if you will find the problem.
> If I can help you somehow, let me know.
>
> --
> Franto Kormanak (fra...@flexets.com)
> Owner & Senior RIA Developer
> at Flexets (http://www.flexets.com)
>
> profile:http://www.linkedin.com/in/franto
> skype: franto.kormanak
>
> 2011/11/15 Dirk Eismann <bort...@googlemail.com>:
>
>
>
>
>
>
>
> > Hi Franto,
> > strange. I just had a quick look at the codebase and it definitely should
> > announce changes to the clientName property correctly.
> > I will try to figure out why it's not working.
> > Dirk.
>
> > 2011/11/15 franto <korma...@gmail.com>
>
> >> Hi Dirk,
>
> >> yes, I've set. This is the mobile application, so I've set clientName
> >> in viewActivate handler. Maybe it's problem that I set clientName
> >> late? Is it important when I set clientName?
>
> >> --
> >> Franto Kormanak (fra...@flexets.com)
> >> Owner & Senior RIA Developer
> >> at Flexets (http://www.flexets.com)
>
> >> profile:http://www.linkedin.com/in/franto
> >> skype: franto.kormanak
>
> >> 2011/11/15 Dirk Eismann <bort...@googlemail.com>:

franto

unread,
Nov 16, 2011, 11:53:14 AM11/16/11
to cocoo...@googlegroups.com
Thank you Dirk for explanation. I will try to listen for
CLIENT_UPDATE. Question is how often is CLIENT_UPDATE dispatched. I
will find that out

Thank you again...

--
Franto Kormanak (fra...@flexets.com)
Owner & Senior RIA Developer
at Flexets (http://www.flexets.com)

profile: http://www.linkedin.com/in/franto
skype: franto.kormanak

2011/11/16 Dirk Eismann <bor...@googlemail.com>:

Reply all
Reply to author
Forward
0 new messages