Constructors
constructor
- new Decoder(
options: {
bufferSize: number;
maxMessageSize: number;
onError: (msgBuffer: Uint8Array, errorMsg: string) => void;
onMessage: (msg: Uint8Array) => void;
},
): Decoder Parameters
- options: {
bufferSize: number;
maxMessageSize: number;
onError: (msgBuffer: Uint8Array, errorMsg: string) => void;
onMessage: (msg: Uint8Array) => void;
}
Methods
decode
- decode(data: Buffer | ArrayLike<Uint8Array>): Uint8Array
Parameters
- data: Buffer | ArrayLike<Uint8Array>
Returns Uint8Array