Hello everybody, i have a question about function recv in a TCP socket connection. In my application i receive several command with diferent lenght. the command is composed for 4 byte of lenght + 4 byte comamnd code + N byte of data.
Does the recv function return me the lenght total, or can be posible to return me less data of the total lenght?
What is the best form to implement this buffer, create a buffer of maximun size (i don´t known exactly the total lenght for command, and i don´t want to create a buffer of 4 byte because is very big?