Hello,
I’ve been exploring the Nakama Client SDK and noticed that it uses a JSON REST API for sending requests. My question is, is it possible for the client to directly use Protobuf instead? I’ve looked into the Nakama .NET SDK and observed that it communicates using JSON data on port 7350. If I wanted to switch to using Protobuf on port 7349, how should I modify the .NET SDK to accommodate this change?
Thank you for your assistance.
Hey jiangben there is currently an experimental PR (Protobuf Support for .NET Socket by lugehorsam · Pull Request #47 · heroiclabs/nakama-dotnet · GitHub) up for this, but adding protobuf support to the Unity client isn’t an active priority at the moment. For a large majority of games, the JSON-based interface will be sufficient. Is this something you just wanted to experiment with or is there a reason specific to your game?
The Nakama Client SDK does indeed primarily use a JSON REST API for communication. However, it is possible for the client to use Protobuf as well. Nakama supports Protobuf with its GRPC API, and there has been an experimental pull request for adding Protobuf support to the .NET Socket. Autodesk AutoCAD 2020 top deal from proCADis. This means that while the main communication method is JSON, there is potential for Protobuf support.