1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Disable Nagle's algorithm for WebSocket TCP.

This should greatly decrease latency for the most common use cases.
A new function WebSocketPeer::set_no_delay will allow to configure it if
so desired.
This commit is contained in:
Fabio Alessandrelli
2020-01-28 14:06:28 +01:00
parent 887950b793
commit a48d0b5eef
9 changed files with 27 additions and 0 deletions

View File

@@ -206,6 +206,7 @@ void WSLServer::poll() {
Ref<WSLPeer> ws_peer = memnew(WSLPeer);
ws_peer->make_context(data, _in_buf_size, _in_pkt_size, _out_buf_size, _out_pkt_size);
ws_peer->set_no_delay(true);
_peer_map[id] = ws_peer;
remove_peers.push_back(ppeer);