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

**URL:** <https://forum.heroiclabs.com/t/advice-questions-on-godot-client-and-websocket-binary-protobuf/6548>\
**Category:** Client Libraries\
**Tags:** server-framework, sdk-godot, golang\
**Created:** [May 9, 2026, 1:15am UTC](https://forum.heroiclabs.com/t/advice-questions-on-godot-client-and-websocket-binary-protobuf/6548 "2026-05-09T01:15:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![one-ton-fatberg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/one-ton-fatberg/32/2760_2.png) [@one-ton-fatberg](https://forum.heroiclabs.com/u/one-ton-fatberg)\
**Post date:** [May 9, 2026, 1:15am UTC](https://forum.heroiclabs.com/t/advice-questions-on-godot-client-and-websocket-binary-protobuf/6548/1 "2026-05-09T01:15:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![one-ton-fatberg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/one-ton-fatberg/32/2760_2.png) [@one-ton-fatberg](https://forum.heroiclabs.com/u/one-ton-fatberg)\
**Post date:** [May 12, 2026, 10:51pm UTC](https://forum.heroiclabs.com/t/advice-questions-on-godot-client-and-websocket-binary-protobuf/6548/2 "2026-05-12T22:51:28Z")

</div>

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.
