コード例 #1
0
            protected override void StopWork(String reason)
            {
                _Server.TryDispose();
                _Server = null;

                base.StopWork(reason);
            }
コード例 #2
0
            protected override void StartWork(String reason)
            {
                // 配置
                var set = Setting.Current;

                // 服务器
                var svr = new LoRaServer()
                {
                    Port = set.Port,
                    Log  = XTrace.Log,
                };

                if (set.Debug)
                {
                    svr.SessionLog = XTrace.Log;
                }

                svr.Start();

                _Server = svr;

                base.StartWork(reason);
            }