Closed maeln closed 2 years ago
Afaik there is no way to disable Nagle algorithm from the client-side. The server is the one responsible for using (or not using) Nagle algorithm.
As NativeWebSocket
is just a WebSocket client, you could for example send some extra parameters on the query string or headers, and enable/disable Nagle based on that on the server.
For a lot of application, Nagle algorithm (https://en.wikipedia.org/wiki/Nagle%27s_algorithm) can add significant unwanted latency. For this reason, most library expose a way to deactivate Nagle algorithm when using websocket (ex: https://docs.microsoft.com/en-us/uwp/api/windows.networking.sockets.streamwebsocketcontrol.nodelay?view=winrt-22000).
Does NativeWebSocket provide a way to deactivate Nagle algorithm ?