* 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)
| 5674 | * @returns {!number} Sent bytes |
| 5675 | */ |
| 5676 | sendSerialized (serialized) { |
| 5677 | console.assert((serialized > 0), 'Invalid size of the serialized buffer!') |
| 5678 | if (serialized <= 0) { |
| 5679 | return 0 |
| 5680 | } |
| 5681 | |
| 5682 | // Shift the send buffer |
| 5683 | this._sendBuffer.shift(serialized) |
| 5684 | |
| 5685 | // Send the value |
| 5686 | let sent = this.onSend(this._sendBuffer.buffer, 0, this._sendBuffer.size) |
| 5687 | this._sendBuffer.remove(0, sent) |
| 5688 | return sent |
| 5689 | } |
| 5690 | |
| 5691 | /** |
| 5692 | * Send message handler |
no test coverage detected