disabled SDL_NODELAY (merged 2008-04-19T02:31:27Z!davewx7@gmail.com from trunk)
This commit is contained in:
parent
0cbc1dad2a
commit
b16b586883
1 changed files with 12 additions and 0 deletions
|
@ -46,6 +46,8 @@
|
|||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h> // for TCP_NODELAY
|
||||
#ifdef __BEOS__
|
||||
#include <socket.h>
|
||||
#else
|
||||
|
@ -364,6 +366,16 @@ void connect_operation::run()
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef TCP_NODELAY
|
||||
//set TCP_NODELAY to 0 because SDL_Net turns it off, causing packet
|
||||
//flooding!
|
||||
{
|
||||
_TCPsocket* raw_sock = reinterpret_cast<_TCPsocket*>(sock);
|
||||
int no = 0;
|
||||
setsockopt(raw_sock->channel, IPPROTO_TCP, TCP_NODELAY, (char*)&no, sizeof(no));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Use non blocking IO
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue