in reply to Re^4: IPC via named pipes, losing some messages
in thread IPC via named pipes, losing some messages
Re: I fixed a bug where a single message could be considered two.
If "C,DIR,1ROSE" is sent over the pipe, the reader might only read "C,DI" which you were treating as an entire message. Then you would proceed to treat "R,1ROSE" as a second message. I fixed this keeping message fragments in the buffer and appending to the unprocessed data in the buffer instead of using a fresh buffer every pass.
The bug in question might not actually exist due to the select, but it's hard to be sure and would be OS-dependent.
Re: I replaced split since you have a record terminator rather than a record separator.
split is useful when your data looks like "ITEM SEP ITEM SEP ITEM". It doesn't make much sense when your data looks like "ITEM TERM ITEM TERM ITEM TERM", as is the case for you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: IPC via named pipes, losing some messages
by ftumsh (Scribe) on May 14, 2008 at 11:34 UTC | |
by ikegami (Patriarch) on May 14, 2008 at 14:50 UTC |