Advice / questions on godot client and websocket binary (protobuf)

Hello, My basic inquiry is how should I go about sending/receiving binary data using protobuf from godot client to nakama.

Here’s where I’m at currently:

with godobuf and the godot sdk, I’ve tried to modify some of the functions like send, _send_async, send_match_state_raw_async, changing variables from string to packedByteArray, and doing the protobuf serialization in _send_async.

I haven’t gotten this to work.

Errors on the server look like:
Received unexpected WebSocket message type, expected:1, actual:2

Any ideas what I’m missing? I’ve searched around but only found a few old posts.

possibly stupid question, do I need to connect to a different port here?
client = Nakama.create_client(“defaultkey”, “127.0.0.1”, 7350, “http”)

Thanks for any info.

I’ve figured out most of what I was doing wrong. leaving this here in case it helps.

beyond tinkering with godobuf to use the api proto from nakama and editing the send/recieve functions in godot sdk to use bytes, write mode binary, you also need to append “format=protobuf” to the socket url.

and I was incorrectly not wrapping the match data messages in the envelope.

mostly working now.