private void OnResponse_Regist(MemoryStream stream, int uid) { MSG_WM2W_RETRUN_REGISTER msg = ProtoBuf.Serializer.Deserialize <MSG_WM2W_RETRUN_REGISTER>(stream); //_tag.GroupId = (ushort)msg.GroupId; //_tag.SubId = (ushort)msg.SubId; //_tag.Ip = Ip; //_tag.Port = Port; Log.Info("registed success to {0}", Tag.GetServerTagString()); }
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()); } }