Am trying to send a proto3 message in node js and encoding into byte array. however according to protobuf js the message is encoded to buffer (and not byte array) instead in node js. Is there a way of encoding this message to byte array as well?
var message = SomeMessage.create(payload);
var buffer = SomeMessage.encode(messager).finish();
console.log(buffer) // returns <Buffer>
If you want an array with the numerical values of the bytes you can try: