L
L
LiptonOlolo2016-08-30 20:22:58
Computer networks
LiptonOlolo, 2016-08-30 20:22:58

How to transfer 270 kb of information over a socket?

Good evening!
Faced with the problem that the socket server accepts only 1kb out of 270kb.
How did I get it? Yes, very easy:
V2VnGPBs0jVLy2.png
It is worth noting that if you run the server locally, then all the data comes.
RmzXvJqfWaGJ6A.png
What do i do? I broke my whole head, but I still can’t figure out how to accept more bytes by the server (remote).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#algooptimize #bottize, 2016-08-30
@user004

https://msdn.microsoft.com/ru-ru/library/8s4y8aff(...
So no one promised that everything would be read in one call.

N
none7, 2016-08-31
@none7

The TCP packet size usually does not exceed 1500 bytes. The Receive method buffers the data from the packet and returns its length. The file, if desired, can even be transferred 1 byte in each packet, and Receive will also consistently return 1 byte. The MTU of the Loopback interface is over 2 GB, so 300 KB of data comes in one packet. The Send method doesn't seem to guarantee that all data will be sent either.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question