summaryrefslogtreecommitdiff
path: root/modules/websocket/emws_peer.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-01-28 14:06:28 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-01-28 14:10:46 +0100
commita48d0b5eefb1d830e0dbb41fcc0a903501178296 (patch)
tree7b4f415da1816692f748183217a3db7dbb3da962 /modules/websocket/emws_peer.cpp
parent887950b79319aff925a0cadf2020021aa512f529 (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.cpp5
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;