-
Notifications
You must be signed in to change notification settings - Fork 91
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
Think about: Should subscribeFail trigger an error on the socket? #88
Comments
hai jondobois, please add maybe what do you think? thanks |
@odenktools The server-side socket has a 'subscribe' event which triggers when the subscription succeeds (same as client socket). https://socketcluster.io/#!/docs/api-scsocket-server You can also use the server 'subscription' event on the SCServer object to listen to subscriptions from a central place (that way you don't need to attach event handlers to individual sockets) https://socketcluster.io/#!/docs/api-scserver Also note that the subscription cannot fail once it hits the server (that's why there is no server-side 'subscribeFail' event); the subscription can only fail if it is blocked by the user's own middleware; but in that case the user can emit their own error events if they want. |
yes on server-side has example my client-driver: Server sidescServer.on('connection', function (socket) { |
@odenktools When listening on the server-side socket, it is 'subscribe'. 'subscription' is when it is emitted on the server (the arguments are different). You don't need to emit a succeeded event from the server like this, you can just listen directly to the 'subscribe' event on the client-side |
Currently i am build you can see @sacOO7 libraries we dont have any
thanks anyway .. maybe its out of topics. Sorry for bad english |
Right now, 'subscribeFail' does not trigger an error on the socket and it is seen as independent from the socket itself. Maybe this behaviour should change?
The text was updated successfully, but these errors were encountered: