mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
windows StreamPeerWinsock::set_nodelay implementation
StreamPeerWinsock::set_nodelay was a no-op. Copied the code from the POSIX implementation because it is also correct on Windows per http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476%28v=vs.85%29.aspx.
This commit is contained in:
parent
891b2bdb4f
commit
afcefc7a0e
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user