public void RequsetRegister() { MSG_W2WM_Register requset = new MSG_W2WM_Register(); requset.GroupId = _api.ApiTag.GroupId; requset.SubId = _api.ApiTag.SubId; Send(requset); Log.Info("request register to {0}", _tag.Type); }
private void OnResponse_Regist(MemoryStream stream, int uid) { MSG_W2WM_Register msg = ProtoBuf.Serializer.Deserialize <MSG_W2WM_Register>(stream); _tag.GroupId = (ushort)msg.GroupId; _tag.SubId = (ushort)msg.SubId; Key = _tag.GetServerKey(); Name = _tag.Type.ToString(); Log.Debug("{0} recv regist info {1}", _api.ApiTag.GetServerTagString(), _tag.GetServerTagString()); MSG_WM2W_RETRUN_REGISTER response = new MSG_WM2W_RETRUN_REGISTER(); response.GroupId = _api.ApiTag.GroupId; response.SubId = _api.ApiTag.SubId; if (_manager.AddServer(this)) { Log.Info("{0} regist succese", Tag.GetServerTagString()); } else { Log.Warn("{0} regist fail", Tag.GetServerTagString()); } }