MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / sendSerialized

Method sendSerialized

projects/JavaScript/proto/fbe.js:5139–5152  ·  view source on GitHub ↗

* Send serialized buffer. * Direct call of the method requires knowledge about internals of FBE models serialization. * Use it with care! * @this {!Sender} * @param {!number} serialized Serialized bytes * @returns {!number} Sent bytes

(serialized)

Source from the content-addressed store, hash-verified

5137 * @returns {!number} Sent bytes
5138 */
5139 sendSerialized (serialized) {
5140 console.assert((serialized > 0), 'Invalid size of the serialized buffer!')
5141 if (serialized <= 0) {
5142 return 0
5143 }
5144
5145 // Shift the send buffer
5146 this._buffer.shift(serialized)
5147
5148 // Send the value
5149 let sent = this.onSend(this._buffer.buffer, 0, this._buffer.size)
5150 this._buffer.remove(0, sent)
5151 return sent
5152 }
5153
5154 /**
5155 * Send message handler

Callers 15

send_OrderMessageMethod · 0.95
send_BalanceMessageMethod · 0.95
send_AccountMessageMethod · 0.95
send_OrderMessageMethod · 0.95
send_BalanceMessageMethod · 0.95
send_AccountMessageMethod · 0.95
send_OrderMessageMethod · 0.45
send_BalanceMessageMethod · 0.45
send_AccountMessageMethod · 0.45
send_OrderMessageMethod · 0.45
send_BalanceMessageMethod · 0.45
send_AccountMessageMethod · 0.45

Calls 3

onSendMethod · 0.95
shiftMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected