public void ReportStateToCS(NetSessionBase session) { Protos.BS2CS_ReportState reportState = ProtoCreator.Q_BS2CS_ReportState(); BSConfig config = BS.instance.config; reportState.BsInfo = new Protos.BSInfo { Id = config.id, Ip = config.externalIP, Port = config.externalPort, State = (Protos.BSInfo.Types.State)BS.instance.state }; session.Send(reportState); }
public ErrorCode OnBs2CsReportState(NetSessionBase session, Google.Protobuf.IMessage message) { Protos.BS2CS_ReportState reportState = (Protos.BS2CS_ReportState)message; return(this.BStateReportHandler(session, reportState.BsInfo)); }