diff --git a/src/lib/synergy/ArgParser.cpp b/src/lib/synergy/ArgParser.cpp index f4ce8984..431a91b7 100644 --- a/src/lib/synergy/ArgParser.cpp +++ b/src/lib/synergy/ArgParser.cpp @@ -326,7 +326,6 @@ ArgParser::parseGenericArgs(int argc, const char* const* argv, int& i) } else if (isArg(i, argc, argv, NULL, "--enable-crypto")) { argsBase().m_enableCrypto = true; - StreamChunker::updateChunkSize(true); } else if (isArg(i, argc, argv, NULL, "--profile-dir", 1)) { argsBase().m_profileDirectory = argv[++i]; diff --git a/src/lib/synergy/StreamChunker.cpp b/src/lib/synergy/StreamChunker.cpp index 651d1a26..a2789f78 100644 --- a/src/lib/synergy/StreamChunker.cpp +++ b/src/lib/synergy/StreamChunker.cpp @@ -37,10 +37,8 @@ using namespace std; -#define SOCKET_CHUNK_SIZE 512 * 1024; // 512kb -#define SECURE_SOCKET_CHUNK_SIZE 2 * 1024; // 2kb +#define CHUNK_SIZE 512 * 1024; // 512kb -size_t StreamChunker::s_chunkSize = SOCKET_CHUNK_SIZE; bool StreamChunker::s_isChunkingClipboard = false; bool StreamChunker::s_interruptClipboard = false; bool StreamChunker::s_isChunkingFile = false; @@ -73,7 +71,7 @@ StreamChunker::sendFile( // send chunk messages with a fixed chunk size size_t sentLength = 0; - size_t chunkSize = s_chunkSize; + size_t chunkSize = CHUNK_SIZE; Stopwatch sendStopwatch; sendStopwatch.start(); file.seekg (0, std::ios::beg); @@ -141,7 +139,7 @@ StreamChunker::sendClipboard( // send clipboard chunk with a fixed size size_t sentLength = 0; - size_t chunkSize = s_chunkSize; + size_t chunkSize = CHUNK_SIZE; Stopwatch sendStopwatch; sendStopwatch.start(); @@ -189,17 +187,6 @@ StreamChunker::sendClipboard( s_isChunkingClipboard = false; } -void -StreamChunker::updateChunkSize(bool useSecureSocket) -{ - if (useSecureSocket) { - s_chunkSize = SECURE_SOCKET_CHUNK_SIZE; - } - else { - s_chunkSize = SOCKET_CHUNK_SIZE; - } -} - void StreamChunker::interruptFile() { diff --git a/src/lib/synergy/StreamChunker.h b/src/lib/synergy/StreamChunker.h index 7ae085f4..c9ac5af1 100644 --- a/src/lib/synergy/StreamChunker.h +++ b/src/lib/synergy/StreamChunker.h @@ -36,12 +36,10 @@ public: UInt32 sequence, IEventQueue* events, void* eventTarget); - static void updateChunkSize(bool useSecureSocket); static void interruptFile(); static void setClipboardInterrupt(bool interrupt); private: - static size_t s_chunkSize; static bool s_isChunkingClipboard; static bool s_interruptClipboard; static bool s_isChunkingFile;