x-cubed / event-store-client

JS client library for connecting to Event Store over TCP/IP
The Unlicense
71 stars 24 forks source link

Support for large messages #19

Closed coreyperkins closed 8 years ago

coreyperkins commented 8 years ago

The onData and receiveMessage functions in connection.js need to use streams to support large messages.

messageLength: 4294967299 UNCAUGHT EXCEPTION!!!!! [RangeError: Invalid typed array length] RangeError: Invalid typed array length at new Uint8Array (native) at createBuffer (buffer.js:23:15) at allocate (buffer.js:98:12) at new Buffer (buffer.js:53:12) at Socket.onData (/Users/Corey/GitHub/UpdecSync/node_modules/event-store-client/lib/connection.js:92:47) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) at Socket.Readable.push (_stream_readable.js:111:10) at TCP.onread (net.js:531:20)