1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +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

@@ -90,6 +90,7 @@ void WSLClient::_do_handshake() {
data->is_server = false;
data->id = 1;
_peer->make_context(data, _in_buf_size, _in_pkt_size, _out_buf_size, _out_pkt_size);
_peer->set_no_delay(true);
_on_connect(protocol);
break;
}