Closed PhuNguyen182 closed 2 months ago
We use this communication method in a game to connect our clients and servers. We have a Unity client for Android, iOS, and WebGL connected via WebSockets. Additionally, we have a Blazor WebGL app that communicates using the same shared library used by Unity with our .NET server.
We have added the MemoryPack formatter support for our endpoints, so all serialization is performed using JSON or the memory pack, which works pretty well.
It's important to note that the payload may not always be smaller than JSON + compression (GZIP, Brotli, etc). However, if your server can generate the serialized data with minimal resources and the payload is small enough (the case when using MemoryPack), it's a good trade-off. Also, you can enable compression, but in our case, it wasn't necessary.
Can MemoryPack work well on mobile platforms such as Android, iOS, or WebGL platform?