what if a header has a return carriage char? thus i wrote "in the http headers". Alright so I used to do the same thing when I wanted to process network input (reading one character at a time). In practice, that is quite slow and I'd strongly advise you rethink the approach some people would track if they are present to decide if their response headers should have them too, but actually you should always send \r\n to terminate headers. The pattern for reading data should involve a buffer for data to land in inside of userland still, that's http not c so not the focus. And all reads/writes to the fd should attempt to use as much of the buffer as possible One read from a socket that has a 10k buffer will take only a little bit more time than a read that has a 1 byte buffer you could fdopen and then use stdio buffering as a toy server you might not care how performant it is, but it might be worthwhile to consider other approaches. such as using stdio -- nice fails to find that way. * carlino3_ has quit (Ping timeout: 256 seconds) and *boom* gone. probably saw none of that. Writing your own buffered io isn't too hard though and will also work on Winblows :) Oh bye guy * carlino3 (68f788c0@gateway/web/freenode/ip.104.247.136.192) has joined carlino ping'd out, so stopped sending anything 4 minutes ago. Welcome back