- Port into cocos2dx v3
- Remove some dependencies (this part can work individually)
- thread safe
Example:
std::string s = "simple_string";
auto mainHub = funny::network::TCPSocketHub::create();
mainHub->setRawPolicy(true);
mainHub->retain();
auto socket = mainHub->createSocket("your ip here", 6869, 11);
auto packet = new funny::network::Packet();
packet->initWithRawBuf(s.c_str(), s.length(), -1);
socket->sendPacket(packet);
packet->release();
Test server
get server in /server/socketserver.py and run it in your local host to test connection.
``` shell
python socketserver.py
```