I have a client server architecture implemented in C ++ with blocking sockets under Windows 7. Everything works well up to a certain load level. If there are several clients (for example,> 4) that receive or send megabytes of data, sometimes communication with one client freezes for about 5 seconds. In this case, all other clients work as expected.
The buffer size is 8192 bytes, and server-side registration is as follows:
TimeStamp (s.ms) - bytes received
...
1299514524.618 - 8192
1299514524.618 - 8192
1299514524.618 - 0004
1299514529.641 - 8192
1299514529.641 - 3744
1299514529.641 - 1460
1299514529.641 - 1460
1299514529.641 - 8192
...
It seems that in 5 seconds you can only read 4 bytes. In addition, I found out that the freezing time is always about 5 seconds - never 4 or less and never 6 or more ...
Any ideas?
Best wishes
Michael
michael
source share