I often get questions about networking in Defold. Sometimes it is as easy as “How do I make an HTTP call?” and I can point to the documentation for http.request() and everyone is happy. Other times the questions are more complex (often relating to socket connections) and in those cases the Defold documentation isn’t enough.
To remedy this lack of information and good examples I decided to collect some Lua modules in a new repository and share them with you. The repo currently contains modules to perform P2P discovery, to create TCP socket servers and clients and finally an example of how to build an HTTP server on top of a TCP socket. You can find the examples here: