Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot seem to have the cljs client set the uid in the connection pool #121

Closed
retrogradeorbit opened this issue Apr 15, 2015 · 3 comments
Closed

Comments

@retrogradeorbit
Copy link

Hi there, I have a problem:

on the client side I call sente/make-channel-socket! to initiate the connection. It generates a uuid as a unique ID and I see that event appear on the server. The id is passed through. If its a reply event I can reply.

But... When I then try to send just a server PUSH message to that id, it never arrives.

I look in connected-uids and I see:

{:ws #{:taoensso.sente/nil-uid}, :ajax #{}, :any #{:taoensso.sente/nil-uid}}

Whatever uid I send in the cljs client, the connection always comes up as id :taoensso.sente/nil-uid.

How can I get this client id to actually be correctly associated with the server side so that generic server PUSH messages to that uid will work?

Thanks!

@ptaoussanis
Copy link
Member

Hi Crispin,

The auto-generated client-id (uuid) cannot be used for server->client push. What you need is a user-id. Please see the README or here for more info.

Hope that helps?

Cheers! :-)

@retrogradeorbit
Copy link
Author

Ah! That link you just gave me really clears things up! Thankyou! It's all working as intended, now.

:D

@ptaoussanis
Copy link
Member

No problem, happy that helped :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants