diff options
author | okamstudio <juan@okamstudio.com> | 2014-02-20 23:54:45 -0200 |
---|---|---|
committer | okamstudio <juan@okamstudio.com> | 2014-02-20 23:54:45 -0200 |
commit | d23bd1250c16aa7a164a08b6f47e4043c2e3401e (patch) | |
tree | df4a1fd2a47852dd5291e3bcb3fd256b76b58c3b /platform/windows | |
parent | da3c7931b7a9a525bb6f6a088cc8c03ee108a2b5 (diff) | |
parent | afcefc7a0ea6061f993704b556e0ac193fd6d16d (diff) |
Merge pull request #107 from bscranton/master
Windows StreamPeerWinsock::set_nodelay implementation
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/stream_peer_winsock.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/windows/stream_peer_winsock.cpp b/platform/windows/stream_peer_winsock.cpp index 2c3a8db7b1..eabfb30599 100644 --- a/platform/windows/stream_peer_winsock.cpp +++ b/platform/windows/stream_peer_winsock.cpp @@ -337,8 +337,9 @@ Error StreamPeerWinsock::connect(const IP_Address& p_host, uint16_t p_port) { }; void StreamPeerWinsock::set_nodelay(bool p_enabled) { - - + ERR_FAIL_COND(!is_connected()); + int flag=p_enabled?1:0; + setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int)); } |