소스 검색

client, server: use a sane SO_SNDBUF, Windows has problems with 1

ambrop7 15 년 전
부모
커밋
81b1c0e14a
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      client/StreamPeerIO.h
  2. 1 1
      server/server.h

+ 1 - 1
client/StreamPeerIO.h

@@ -51,7 +51,7 @@
 #include <client/PasswordListener.h>
 #include <client/PasswordSender.h>
 
-#define STREAMPEERIO_SOCKET_SEND_BUFFER 1
+#define STREAMPEERIO_SOCKET_SEND_BUFFER 4096
 
 /**
  * Callback function invoked when an error occurs with the peer connection.

+ 1 - 1
server/server.h

@@ -51,7 +51,7 @@
 // after how long of not hearing anything from the client we disconnect it
 #define CLIENT_NO_DATA_TIME_LIMIT 30000
 // SO_SNDBFUF socket option for clients
-#define CLIENT_SOCKET_SEND_BUFFER 1
+#define CLIENT_SOCKET_SEND_BUFFER 4096
 
 // maxiumum listen addresses
 #define MAX_LISTEN_ADDRS 16