WebSocket on love-android
Posted: Tue Dec 28, 2021 8:22 am
I am trying to make a multiplayer game with Node.js as backend. I am deploying it on Heroku. As Heroku does not support TCP (at least on free and hobby tier), I have to use WebSockets. I found several libraries for WebSockets, such as:
These have either C or C++ dependencies or written in C++ itself. But I was not able to find any documentation on how to use C or C++ dependencies with love-android(there's also the hassle of compiling it for my desktop platform for developing and testing).
I also found this websocket client written in pure lua: https://github.com/flaribbit/love2d-lua-websocket. It works perfectly when my server is running on localhost but connects and then disconnects immediately (according to STATUS property provided by the library) when I try to connect to my deployed server on Heroku. I tried other WebSocket clients and a Node client I wrote myself and they work properly. So it is a problem with this library.
Please either point out the problem with flaribbit's websocket implementation or point to a tutorial about how to use C and C++ modules with love-android. Of course, I would prefer if I can work with flaribbit's websocket implementation as it rules out a whole lot of hassle of compilation.
I also found this websocket client written in pure lua: https://github.com/flaribbit/love2d-lua-websocket. It works perfectly when my server is running on localhost but connects and then disconnects immediately (according to STATUS property provided by the library) when I try to connect to my deployed server on Heroku. I tried other WebSocket clients and a Node client I wrote myself and they work properly. So it is a problem with this library.
Please either point out the problem with flaribbit's websocket implementation or point to a tutorial about how to use C and C++ modules with love-android. Of course, I would prefer if I can work with flaribbit's websocket implementation as it rules out a whole lot of hassle of compilation.