G
Guest
Hello Developpers,
I am developping a TCP/IP Client application using Visual C++ .NET Standard on Windows 2000 Pro.
I noticed that I could not receive more than 2KB once at a time. The server application sends me intensive data. Before this, I receive a feedback command that informs about what kind of prepations I should do next statements. This feedback command is sometimes more than 2KB (2048 Bytes). If the feedback command is less or equal to 2KB, there is not any problem to receive all of it with one recv(...) functions. In the case of being greater, I should use more than one recv(...) .
In order to solve this, I changed my technique. First, I receive 2 Bytes that says me the size of the feedback command. Than, I run my recv(..) function in a while(...) loop till the expected number of Bytes are received. Than I pass to other operations.
Could you tell me how to resize the recv(..) buffer size!!! I learned that TCPWindowSize is for this purpose. But I could not find any sample.
My initial recv(...) function was as follow:
...
#define Max_Buffer_Size 30000
...
char* recvBuf = new char[Max_Buffer_Size];
int retRecvVal = recv( ClientSocket , recvBuf , Max_Buffer_Size , 0);
...
I would like to thank you in advance for your sincere guidance
I am developping a TCP/IP Client application using Visual C++ .NET Standard on Windows 2000 Pro.
I noticed that I could not receive more than 2KB once at a time. The server application sends me intensive data. Before this, I receive a feedback command that informs about what kind of prepations I should do next statements. This feedback command is sometimes more than 2KB (2048 Bytes). If the feedback command is less or equal to 2KB, there is not any problem to receive all of it with one recv(...) functions. In the case of being greater, I should use more than one recv(...) .
In order to solve this, I changed my technique. First, I receive 2 Bytes that says me the size of the feedback command. Than, I run my recv(..) function in a while(...) loop till the expected number of Bytes are received. Than I pass to other operations.
Could you tell me how to resize the recv(..) buffer size!!! I learned that TCPWindowSize is for this purpose. But I could not find any sample.
My initial recv(...) function was as follow:
...
#define Max_Buffer_Size 30000
...
char* recvBuf = new char[Max_Buffer_Size];
int retRecvVal = recv( ClientSocket , recvBuf , Max_Buffer_Size , 0);
...
I would like to thank you in advance for your sincere guidance