@projectgoo wrote:
Hi,
I am trying to create multiplayer P2P game for IOS, Android and WP8.
The connection between the peers will be based on TCP and I have decided to use boost::asio and it will be synchronous.I have tried to run a simple code block for the peer which will act like server but it crushes:
asio::ip::tcp::endpoint ep(asio::ip::address_v4::any(), 3333);
asio::io_service ios;
asio::ip::tcp::acceptor acceptor(ios, ep);
asio::ip::tcp::socket sock(ios, ep.protocol());
acceptor.accept(sock);I have tried the same code in simple console application and it runs perfect but when I run it inside the cocos2d-x framework it crushes.
Is there something that I am doing wrong ?
P.S do not pay attention on the ::any() part, it is just for the purposes of testing.
Thanks in advance
Posts: 1
Participants: 1