I'm not sure why this is happening. It might add part of the line to a buffer and then determine that the buffer is full before sending the rest of the line, so the remainder would go in the next packet. In theory, I'm not sure that this should matter, but I'm guessing it might be confusing the client. I've just changed the code to only try to add whole lines to the buffer. Anyway, let us know if this helps.