A
antimon
Hi,
I need to have a simple http server in one of my applications. It's
just for a little text data so i wanted to write my own.
So i have a listener on port 80 and i'm using async methods to receive
/ send data. My problem is, i found lots of sample web server
applications, all of them just calls socket.read method for 1-4kb data.
And parses the response for headers. Isn't it possible to receive
partial data from socket and break this method? I mean i do telnet
google.com:80 and write my request, server doesn't respond till i send
double newline.
What would you suggest? Just read once and go or check received data
for CRLF+CRLF?
I need to have a simple http server in one of my applications. It's
just for a little text data so i wanted to write my own.
So i have a listener on port 80 and i'm using async methods to receive
/ send data. My problem is, i found lots of sample web server
applications, all of them just calls socket.read method for 1-4kb data.
And parses the response for headers. Isn't it possible to receive
partial data from socket and break this method? I mean i do telnet
google.com:80 and write my request, server doesn't respond till i send
double newline.
What would you suggest? Just read once and go or check received data
for CRLF+CRLF?