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

[feature] Shutting down websocket #97

Open
habi498 opened this issue Sep 8, 2024 · 1 comment
Open

[feature] Shutting down websocket #97

habi498 opened this issue Sep 8, 2024 · 1 comment
Labels

Comments

@habi498
Copy link

habi498 commented Sep 8, 2024

Is your feature request related to a problem? Please describe.
I was trying to integrate websocket server inside squirrel via its api. I created function StartWebsocketServer(host, port, timeout);
Then i see that users cannot close it.

Describe the solution you'd like
I like to have a function ws_shutdown() which will shut everything down, stop the threads, close the sockets.

Describe alternatives you've considered
I considered alternative as manually close port on ws.c

Additional context

@habi498 habi498 added the feature label Sep 8, 2024
@Theldus
Copy link
Owner

Theldus commented Sep 11, 2024

Hi @habi498,
This is a long standing feature requested for a few years, since issue #31 at least.

I haven't implemented it yet because I'm not sure on how to do it: whether I should gracefully close each client connection, or if it's 'ok' to just abruptly close connections. Since wsServer is advertised as RFC 6455-compliant, these are questions that concern me a bit about how to approach this.

I still want to implement it, and I want to see how other big and reference libraries do it, if most of them just abruptly close the connections, I won't have a problem doing that either =).

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

No branches or pull requests

2 participants