NodeJS will automatically invoke client.on('data'...) when the data exceeds 2^16 characters. This means that long messages will be chunked into multiple small blocks, preventing us from reconstituting them properly.
The changes here allow us to buffer the results of a transmission greater than 2^16 in size. Therefore, we can have messages greater than this size.
In order to achieve this, we append data to message_buffer until we receive the control signal of 'end of transmission' via our check with the transmission_end_index.
I've also thought that we may create a server PER protocol to avoid race conditions and improve throughput. Just another thought for potential future work!
NodeJS will automatically invoke client.on('data'...) when the data exceeds 2^16 characters. This means that long messages will be chunked into multiple small blocks, preventing us from reconstituting them properly.
The changes here allow us to buffer the results of a transmission greater than 2^16 in size. Therefore, we can have messages greater than this size.
In order to achieve this, we append data to message_buffer until we receive the control signal of 'end of transmission' via our check with the transmission_end_index.
Fixes #19.