-
Pomelo的.NET客户端pomelo-unityclient-socket.zip下载
资源介绍
pomelo-unityclient-socket 是 Pomelo 的 .NET 客户端,支持 Pomelo 0.3和新的交流协议,基于原生的 Socket。示例Unity3D demo dotnet demo API初始化using namespace Pomelo.DotNetClient
string host="127.0.0.1";//(www.xxx.com/127.0.0.1/::1/localhost etc.)
int port=3014;
PomeloClient pclient = new PomeloClient();
//listen on network state changed event
pclient.NetWorkStateChangedEvent = (state) =>
{
Console.WriteLine(state);
};
pclient.initClient(host, port, () =>
{
//The user data is the handshake user params
JsonObject user = new JsonObject();
pclient.connect(user, data =>
{
//process handshake call back data
});
});
标签:pomelo