Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ErrorCode OnBs2CsReportState(NetSessionBase session, Google.Protobuf.IMessage message)
 {
     Protos.BS2CS_ReportState reportState = (Protos.BS2CS_ReportState)message;
     return(this.BStateReportHandler(session, reportState.BsInfo));
 }