R
Robert
Hi,
Is it me or is the recv() function not erasing but only overwriting the last
data it supplied?
example:
when i first send:
"login robert test"
and then try
"getstatus robert"
i see that it recieved:
"getstatus robertt"
I've noticed this before with some other strings using recv
This is a piece of code i am using:
char buf[256]; /* buffer for client data */
if ((aant_bytes = recv(i, buf, sizeof(buf), 0)) <= 0) {
.....
Do i have to erase the content before the next loop or something?
Thanks in Advance,
Robert
Is it me or is the recv() function not erasing but only overwriting the last
data it supplied?
example:
when i first send:
"login robert test"
and then try
"getstatus robert"
i see that it recieved:
"getstatus robertt"
I've noticed this before with some other strings using recv
This is a piece of code i am using:
char buf[256]; /* buffer for client data */
if ((aant_bytes = recv(i, buf, sizeof(buf), 0)) <= 0) {
.....
Do i have to erase the content before the next loop or something?
Thanks in Advance,
Robert