3

I'm not sure I got this right yet, but as I understand it, when I attach a handler to the data event, it gives me all the data it got until then. The problem is, how do I handle buffering that data, as Node.js might give me less that 4 bytes at a time (which is the minimum I need), especially when there will be multiple concurrent requests?

1 Answer 1

5

I think this problem has been tackled in this article: http://openmymind.net/2012/1/12/Reading-From-TCP-Streams/

Links to the 2 solutions described there:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.