@ueda_keisuke wrote:
Hi all,
I am thinking of connecting other devices via WebSocket or SocketIO with cocos2d-x. I just wrote
websocket->init(*this, "ws://theserver.local:8000");
and
_client = SocketIO::connect("http://theserver.local:8080", *this);
and ran my cocos project but the program could not connect to the host named theserver.local. In terminal, I have confirmed that I could reach theserver.local. That is,
ssh theserver.local
worked correctly. The server's OS is Debian Linux and Avahi service is running on the server.
My question is that is there any zero-configuration networking implementation to discover other computer in cocos2d-x? I found an article and in the article, Fradow said
I am not convinced this is any easier. The last time I tried (it was a few years ago, there may be better solutions now), just getting a discovery service up and running (I used Bonjour from Apple) was not that easy.
He seems to have used Bonjour from Apple when cocos2d-x was 3.2.
I don't want players to specify server's IP address. It should be automatically done.
Any feedback appreciated. Thank you.
Posts: 1
Participants: 1