void Recv_Kickout_Ntf(System.IO.MemoryStream buffer) { string json = System.Text.Encoding.UTF8.GetString(buffer.GetBuffer(), (int)buffer.Position, (int)(buffer.Length - buffer.Position)); Msg_Kickout_Ntf ntf = JsonUtility.FromJson <Msg_Kickout_Ntf>(json); Error(new Gamnet.Exception(ntf.error_code)); Close(); }
public override void OnRecvMsg(System.IO.MemoryStream buffer) { string json = System.Text.Encoding.UTF8.GetString(buffer.GetBuffer(), (int)buffer.Position, (int)buffer.Length); Msg_Kickout_Ntf ntf = JsonUtility.FromJson <Msg_Kickout_Ntf>(json); Debug.Log("[Session.KickoutHandler.OnRecvMsg] recv kickout ntf(error_code:" + ntf.error_code + ")"); session.Error(new Gamnet.Exception(ErrorCode.DuplicateConnectionError)); session.Close(); }