allinurl / gwsocket

fast, standalone, language-agnostic WebSocket server RFC6455 compliant
http://gwsocket.io
MIT License
745 stars 67 forks source link

API to disconnect client in strict mode #49

Open yarreg opened 1 year ago

yarreg commented 1 year ago
allinurl commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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