alervd wrote:receive a data: process.stdout.on ('data', myfunction);
process.stdout.on ('data', function (MY44BYTEDATAHERE) { // do stuff... });
The problem is that MY44BYTEDATAHERE is a string with length = 1. It contains the very first byte sent by my exe. The remaining 43 bytes sent by my EXE just lost somewhere.
After rereading APIs, your code etc. I have come to the conclusion that one emit call is exactly related to one call of the listener. You have two emit calls you you should have two listener calls. The first one with the length and the second with the data. There is no information if events are combined or not.
If this is not the reality I'm out here. I'm out of ideas.
PS: Sometimes I get confused while reading things. Sorry for that.
Think for yourself. Otherwise you have to believe what other people tell you. A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve. Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
mozillaZine is an independent Mozilla community and advocacy site. We're not affiliated or endorsed by the Mozilla Corporation but we love them just the same.