* 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)
| 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 |
no test coverage detected