Number of bytes on ReadBytes

BlitzPlus Forums/BlitzPlus Beginners Area/Number of bytes on ReadBytes

Baley(Posted 2006) [#1]
Is there a way to know how much bytes I should wait for (in advance) in a TCP stream, using :
ReadBytes(BUFFER_tcp,HANDLE_tcp,0,num_bytes)


I mean I don't know in advance how many bytes the server will send. Thank you.


Andres(Posted 2006) [#2]
you can get the number of bytes received by function: ReadAvail(), but if you want to know how long is the "fail" you are going to receive then you'll need to send the length of it.