public object GetRegisterResponse() { IPAddress masterAddress = this.application.GetInternalMasterNodeIpAddress(); var contract = new RegisterGameServerInitResponse { InternalAddress = masterAddress.GetAddressBytes(), ReturnCode = (short)ErrorCode.Ok, DebugMessage = string.Empty, }; return(contract.ToDictionary()); }
protected override void OnConnectionEstablished(object responseObject) { this.masterServerConnection.OnConnectionEstablished(); if (responseObject == null) { if (log.IsInfoEnabled) { log.Info($"Init Response object is null. Use operation request to register on master"); } this.RequestFiber.Enqueue(this.Register); return; } var response = new RegisterGameServerInitResponse(this.Protocol, (Dictionary <byte, object>)responseObject); this.HandleRegisterGameServerResponse(response.ReturnCode, response.DebugMessage, response); }