How to run server using WebSockets?

Hey Defold,

Loving defold-websockets, I’ve figured my way around the client object somewhat. Currently looking for a way to run a server instance to perform the following:

  1. Bind to a port on localhost
  2. Read TCP packets sent to localhost:port
  3. Update internal defold game-state accordingly
  4. Allthewhile supply TCP packets of game-state on ??

Is this a reasonable server-side application design? Which resources should I consult to get examples and docs for implementing it? Which packages might be best to explore? Is this within or beyond the scope of a Defold game?

Cheers

For the wary souls reading, I’ve found Björn’s gamelift package - is there anything similar I could use to run a server on a local docker container?