function ReadBuffer(var Buffer; const Count: integer): integer; overload;
function ReadBuffer(var Buffer: TBytes; const Offset, Count: integer): integer; overload;
Reads Count bytes from the stream of server data into Buffer. ReadBuffer returns the count of bytes that were actually read.
If the size of the received data is less than Count bytes, ReadBuffer waits the amount of time specified in Timeout, and then returns control.