S
Shaun Duncan
Ok, so I'm not good with sockets, but I need some help. Every now and then,
when I call recv() to get the message sent by a client I wrote, it adds more
characters to the buffer than was indicated by the return value of recv().
Example, a particular call returns:
(53 -- 62): GET /images/mspaint.bmp HTTP/1.0 HOST: localhost:4210host:4210
(53 -- 62): GET /images/mspaint.bmp HTTP/1.0 HOST: localhost:4210host:4210
(47 -- 52): GET /document.txt HTTP/1.0 HOST: localhost:4210:4210
The first number is returned by recv() and the second is the value of
strlen() of the buffer. I'm stumped....any suggestions?
Thanks!
when I call recv() to get the message sent by a client I wrote, it adds more
characters to the buffer than was indicated by the return value of recv().
Example, a particular call returns:
(53 -- 62): GET /images/mspaint.bmp HTTP/1.0 HOST: localhost:4210host:4210
(53 -- 62): GET /images/mspaint.bmp HTTP/1.0 HOST: localhost:4210host:4210
(47 -- 52): GET /document.txt HTTP/1.0 HOST: localhost:4210:4210
The first number is returned by recv() and the second is the value of
strlen() of the buffer. I'm stumped....any suggestions?
Thanks!