Skip to content

Support for binary response / hex output:  #145

Description

@franky436

Before “ws.send(programOptions.execute);” add:
ws.binaryType = "arraybuffer";

For hex output use:
wsConsole.print(Console.Types.Incoming, buf2hex(data), Console.Colors.Blue);

p.s.
function buf2hex(buffer) { // buffer is an ArrayBuffer
return [...new Uint8Array(buffer)]
.map(x => x.toString(16).padStart(2, '0'))
.join('');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions