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

API to disconnect client in strict mode #49

Open
yarreg opened this issue Jun 1, 2023 · 3 comments
Open

API to disconnect client in strict mode #49

yarreg opened this issue Jun 1, 2023 · 3 comments

Comments

@yarreg
Copy link

yarreg commented Jun 1, 2023

  • In the event that a client fails to pass the authorization process, it becomes necessary to disconnect them from the WebSocket connection promptly;
  • Load balancing...
@allinurl
Copy link
Owner

allinurl commented Jun 4, 2023

I'm not sure what you're asking. Could you please clarify your question or provide more information about the issue you're experiencing?

@yarreg
Copy link
Author

yarreg commented Jun 4, 2023

I need an API (e.g in gwsocket strict mode) to disconnect an already connected client.
For example, it is need to disconnect a user who has not passed the authentication process.

@allinurl
Copy link
Owner

allinurl commented Jun 8, 2023

Invoking ws_close(listener) should address your issue. Alternatively, you could use ws_handle_close(client), which may be a better approach. However, both ways will require changing the function's scope, as they're currently set to static

@allinurl allinurl added the change label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants