javascript - Using meteorjs how can I identify discrete connected clients? -


i want able treat each connected client differently based on conditions can't seem figure out how target individual client. need kind of unique reference per client can't find either on client or on server part of pub/sub interaction or otherwise.

i noticed userid depends on user creating account , signing in, otherwise remains set null.

how i, example, show message on recent client connect, or set queuing system give connected clients access limited resource?

thanks!

i think this.setuserid() can want:

call function change logged in user on connection made method call. sets value of userid future method calls received on connection. pass null log out connection.

you can check if id null , if set unique identifier. place in first method or publish function clients call.

info on function , quote http://docs.meteor.com.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -