Skip to content

Commit e6487f8

Browse files
committed
removed hardcoded socket settings
1 parent 843998c commit e6487f8

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

include/DMDUtil/DMD.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <winsock2.h> // Windows byte-order functions
2020
#else
2121
#include <arpa/inet.h> // Linux/macOS byte-order functions
22-
#include <netinet/tcp.h>
2322
#endif
2423

2524
#include <atomic>

src/DMD.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ class DMDServerConnector
5555
sockpp::tcp_connector* pConnector = new sockpp::tcp_connector({pAddress, (in_port_t)port});
5656
if (pConnector)
5757
{
58-
int flag = 1;
59-
int mss = 1200; // Conservative size
60-
int bufsize = 65536;
61-
pConnector->set_option(IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag));
62-
pConnector->set_option(IPPROTO_TCP, TCP_MAXSEG, &mss, sizeof(mss));
63-
pConnector->set_option(SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
64-
pConnector->set_option(SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
6558
return new DMDServerConnector(pConnector);
6659
}
6760
return nullptr;

src/dmdServer.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <winsock2.h> // Windows byte-order functions
33
#else
44
#include <arpa/inet.h> // Linux/macOS byte-order functions
5-
#include <netinet/tcp.h>
65
#endif
76

87
#include <algorithm>
@@ -368,14 +367,6 @@ int main(int argc, char* argv[])
368367
}
369368
else
370369
{
371-
int flag = 1;
372-
int mss = 1200; // Conservative size
373-
int bufsize = 65536;
374-
sock.set_option(IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag));
375-
sock.set_option(IPPROTO_TCP, TCP_MAXSEG, &mss, sizeof(mss));
376-
sock.set_option(SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
377-
sock.set_option(SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
378-
379370
threadMutex.lock();
380371
currentThreadId = ++threadId;
381372
threads.push_back(currentThreadId);

0 commit comments

Comments
 (0)