BufferWriter
Defined in: src/protocol/buffer.ts:70
Cursor-based writer producing MeshCore companion frames. Methods chain.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BufferWriter(): BufferWriter;Returns
Section titled “Returns”BufferWriter
Methods
Section titled “Methods”toBuffer()
Section titled “toBuffer()”toBuffer(): Buffer;Defined in: src/protocol/buffer.ts:109
Returns
Section titled “Returns”Buffer
writeByte()
Section titled “writeByte()”writeByte(b): this;Defined in: src/protocol/buffer.ts:73
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
b | number |
Returns
Section titled “Returns”this
writeBytes()
Section titled “writeBytes()”writeBytes(b): this;Defined in: src/protocol/buffer.ts:92
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
b | Buffer<ArrayBufferLike> | readonly number[] |
Returns
Section titled “Returns”this
writeCString()
Section titled “writeCString()”writeCString(s, maxLen): this;Defined in: src/protocol/buffer.ts:101
Fixed-width null-padded string: writes exactly maxLen bytes, always
null-terminated (last byte forced to 0).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
s | string |
maxLen | number |
Returns
Section titled “Returns”this
writeInt32LE()
Section titled “writeInt32LE()”writeInt32LE(n): this;Defined in: src/protocol/buffer.ts:89
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
n | number |
Returns
Section titled “Returns”this
writeInt8()
Section titled “writeInt8()”writeInt8(b): this;Defined in: src/protocol/buffer.ts:77
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
b | number |
Returns
Section titled “Returns”this
writeString()
Section titled “writeString()”writeString(s): this;Defined in: src/protocol/buffer.ts:96
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
s | string |
Returns
Section titled “Returns”this
writeUInt16LE()
Section titled “writeUInt16LE()”writeUInt16LE(n): this;Defined in: src/protocol/buffer.ts:80
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
n | number |
Returns
Section titled “Returns”this
writeUInt32LE()
Section titled “writeUInt32LE()”writeUInt32LE(n): this;Defined in: src/protocol/buffer.ts:84
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
n | number |
Returns
Section titled “Returns”this