summaryrefslogtreecommitdiff
path: root/drivers/windows/stream_peer_tcp_winsock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/windows/stream_peer_tcp_winsock.cpp')
-rw-r--r--drivers/windows/stream_peer_tcp_winsock.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/windows/stream_peer_tcp_winsock.cpp b/drivers/windows/stream_peer_tcp_winsock.cpp
index d6a320fb5e..cb501ce35d 100644
--- a/drivers/windows/stream_peer_tcp_winsock.cpp
+++ b/drivers/windows/stream_peer_tcp_winsock.cpp
@@ -332,10 +332,12 @@ Error StreamPeerTCPWinsock::connect_to_host(const IP_Address &p_host, uint16_t p
return OK;
};
-void StreamPeerTCPWinsock::set_nodelay(bool p_enabled) {
+void StreamPeerTCPWinsock::set_no_delay(bool p_enabled) {
ERR_FAIL_COND(!is_connected_to_host());
int flag = p_enabled ? 1 : 0;
- setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
+ if (setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int)) != 0) {
+ ERR_PRINT("Unable to set TCP no delay option");
+ }
}
int StreamPeerTCPWinsock::get_available_bytes() const {