private void OnAddConnection(Body body, IConnection connection) { connection.RegisterProtocol <AutoProtocolHandler>(); connection.RegisterProtocol <ClientProtocolHandler>().SetWorld(m_World); SLogin login = new SLogin(); login.PlayerID = 567; login.Token = "yinhuayong"; login.Timestamp = 10; login.Flag = 20; ByteBuffer buffer = ByteBuffer.Allocate(512); buffer.Write("零下206度5"); Sender.Login(login, buffer, Encoding.UTF8.GetBytes("11"), 1000); }
public static void Login(SLogin login, ByteBuffer buffer, byte[] data, int k) { }
public static void LoginRsp(SLogin login) { Debug.Log(login.PlayerID); }