uNetworkingAB
uNetworkingAB
sendFirstFragment, sendFragment, sendLastFragmet are under WebSocket
They are missing from documentation yes https://unetworking.github.io/uWebSockets.js/generated/interfaces/WebSocket.html
Btw, fragmentation sounds like an obvious thing to expose to user code but in practice, rarely anyone cares. The first prototype of this library exposed fragments and everyone hated it...
If you want to use fragmented sends you cannot use regular sends in between, that includes being subscribed to something that publishes.
Yes it can be run in another thread but if so, you cannot call any method from other threads. The only thread safe function is Loop::defer which is like io_context::dispatch...
Strange. Does it happen if you just make the most minimal app.get -> res.endWithoutBody() ?
Okay yes it does. I get it. It only happens if you pass a number. Makes sense.
https://github.com/uNetworking/uWebSockets/commit/c8da12b537516489b2e01dacf4d836b5bc74e826 This fixes it. I need to make a new release but it will take some time. Haven't done one in a while.
Aha, ok. But this only happens if you build the binary yourself?
I can't reproduce it: > CXXFLAGS="-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG" make produces: --> g++ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -march=native -O3 -Wpedantic -Wall -Wextra -Wsign-conversion -Wconversion -std=c++20 -Isrc -IuSockets/src -flto=auto examples/EchoBody.cpp uSockets/*.o -lz -o EchoBody --> g++ -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG...