Type us_listen_socket extends us_socket (as per uSocket's internal.h)
Two related notes
At the moment closeOnBackpressureLimit and sendPingsAutomatically are Int32Value in AppWrapper.h, should these be BooleanValue?
At the moment the native types have compatible interfaces which means that us_socket_context_t or any object can be used in places that only accept a us_listen_socket. I think that you could do something like this to avoid that happening:
This isn't perfect (as users could attempt to use listenToken._us_listen_socket), but imo it's an improvement. Do you think this something worth raising an issue for?
Hi there 👋
Breaking changes:
App.listen()
callback parameter type definitions. This is a breaking change if anyone was incorrectly using the types before.Non-breaking changes:
maxBackpressure
- default is now 64KB (updated in https://github.com/uNetworking/uWebSockets/commit/20fbdbb7aed6f303caef38eadc1a7ee3aac2e95e)closeOnBackpressureLimit
(added in https://github.com/uNetworking/uWebSockets.js/commit/5d6a9c51941ff472a7665549a5de493f8a2618d7)us_listen_socket
extendsus_socket
(as per uSocket's internal.h)Two related notes
closeOnBackpressureLimit
andsendPingsAutomatically
are Int32Value in AppWrapper.h, should these be BooleanValue?us_socket_context_t
or any object can be used in places that only accept aus_listen_socket
. I think that you could do something like this to avoid that happening:This isn't perfect (as users could attempt to use
listenToken._us_listen_socket
), but imo it's an improvement. Do you think this something worth raising an issue for?