On Fri, Aug 10, 2012 at 12:27 AM, Yordan Ivanov
<[email protected]> wrote:
> 1. The symbol \n flushesh your buffer and "forces" data sending. It is a way
> for (allmost) any platform to flush the buffer.

That is not even remotely accurate.  There is nothing at all magical
about the 0x0A byte.  This is TCP, not a shell repl.

$ node -e 
'require("http").createServer(function(q,s){s.end("hello")}).listen(8000)'
&
[1] 60440

$ curl localhost:8000
hello
$

https://skitch.com/isaacschlueter/ecnwj/localhost-8000


>> i noticed that response.write('hello\n'); will send 'hello' to the client.
>> but ommiting the \n does not. is it chrome specific or
>> is that node's way to stream part of the response to it's clients?

Are you ever calling response.end()?  Share your code in a gist if you
want further help.


>> also, is node server always streams the response back to it's client?

I'm not sure what that question means.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to