diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-01-28 14:06:28 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-01-28 14:10:46 +0100 |
commit | a48d0b5eefb1d830e0dbb41fcc0a903501178296 (patch) | |
tree | 7b4f415da1816692f748183217a3db7dbb3da962 /modules/websocket/emws_peer.cpp | |
parent | 887950b79319aff925a0cadf2020021aa512f529 (diff) |
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.
Diffstat (limited to 'modules/websocket/emws_peer.cpp')
-rw-r--r-- | modules/websocket/emws_peer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp index d07360c525..effed8e4d9 100644 --- a/modules/websocket/emws_peer.cpp +++ b/modules/websocket/emws_peer.cpp @@ -139,6 +139,11 @@ uint16_t EMWSPeer::get_connected_port() const { ERR_FAIL_V_MSG(0, "Not supported in HTML5 export."); }; +void EMWSPeer::set_no_delay(bool p_enabled) { + + ERR_FAIL_MSG("'set_no_delay' is not supported in HTML5 export."); +} + EMWSPeer::EMWSPeer() { peer_sock = -1; write_mode = WRITE_MODE_BINARY; |