Increased buffer to match in size with SharedMemoryChannel

This commit is contained in:
ftc
2023-03-02 23:12:46 +03:00
parent ac2f2ead72
commit b88d21d4cf
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ string SynchronousSocket::Receive(int amount)
time_t start = time(NULL);
while ((int)r.length() < amount)
{
char buf[1024];
char buf[BUFFER_SIZE];
int to_recv = min((int)sizeof(buf), amount - (int)r.length());
int res = recv(socket, buf, to_recv, 0);
if (res == 0)
+1
View File
@@ -9,6 +9,7 @@ class SynchronousSocket
{
private:
const int TIMEOUT = 10; // in seconds
const int BUFFER_SIZE = 1048576;
protected:
// собственно сокет
int socket;