heroiclabs / nakama-defold

Defold client for Nakama server.
https://heroiclabs.com
Apache License 2.0
78 stars 13 forks source link

Update to use extension-websocket #16

Closed JCash closed 3 years ago

JCash commented 3 years ago

The use of Defold's new websocket extension will reduce the executable size a lot, as well as improve the speed of the socket communications.

https://github.com/defold/extension-websocket

novabyte commented 3 years ago

@JCash It would be great to switch over to the native socket especially as I see it has support for TCP QUICK ACK. I handled realized it was officially released yet. I'll work with @britzl to see how best to integrate it.

JCash commented 3 years ago

Hi @novabyte! Although we haven't technically announced the official release of the new extension, I thought I should add it as a ticket here, so that someone (possibly @britzl) can make the update, and possibly report any issues detected.

There is currently no outstanding issues reported by the beta testers We will announce it as "released" (we're already on version 1.4) when we release Defold 1.2.175.

As for support for TCP_QUICKACK, we do have an issue to add support for it in the extension: https://github.com/defold/extension-websocket/issues/3

Our problem here is that there seem to be no clear, documented way on how to use it, and it's not supported on macOS/Windows. We'd be happy to receive advice on how to add the functionality. We've already added dmSocket::SetQuickAck(bool) to our Defold SDK, so the only thing remaining is the changes in the extension.

britzl commented 3 years ago

Yes, I have it on my list of things to do already! I think I'll start looking into this next week.

britzl commented 3 years ago

I think I'll start looking into this next week.

What a liar I am! Doing it now!

britzl commented 3 years ago

First version here: https://github.com/heroiclabs/nakama-defold/tree/dev-use-websocket-extension

Works with the example in this repo and a basic server setup.

novabyte commented 3 years ago

That was very fast @britzl ! Thanks 🙏 I can take a look at a pull request.

britzl commented 3 years ago

@novabyte PR is ready