Skip to content

Ability to "close" sockets without dropping pending requests #874

Answered by e3dio
tayler-king asked this question in Q&A
Discussion options

You must be logged in to vote

I cannot fathom of a way to cleanly handling blocking of new requests

import { App, us_listen_socket_close } from 'uWebSockets.js';

let listenSocket;
const app = App().listen(port, s => listenSocket = s);

// block new requests
us_listen_socket_close(listenSocket);

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@tayler-king
Comment options

@e3dio
Comment options

@tayler-king
Comment options

Answer selected by tayler-king
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tayler-king
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants