From my client:
send(socket, "this is a buffer", ...);
send(socket, "second buffer", ...);
From my server, is recv guaranteed to end one chunk with the r from "this is a buffer" and begin another chunk with the s from "second buffer'?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, not at all. You have no control over what happens when you receive the data due to all of the processing of the network. You can’t make any assumption about how much you will get in any recv call (except for that it will be <= the amount sent). You could get as little as one byte.