Пример #1
0
 public Service()
 {
     if (Ground.i.cipherMode == Consts.CipherMode_e.NOT_ENCRYPT)
     {
         _playerProc = new PlayerProc();
         _recverProc = new RecverProc(Ground.i.portNo);
     }
     else
     {
         _playerProc     = new PlayerProc();
         _recverProc     = new RecverProc(Ground.i.forwardPortNo);
         _crypTunnelProc = new CrypTunnelProc(Ground.i.portNo, Ground.i.forwardPortNo, Ground.i.key, Ground.i.passphrase + Ground.i.passphraseSuffix);
     }
     _frtwv = new Fortewave(Consts.FRTWV_RECVER_TO_SERVER, Consts.FRTWV_SERVER_TO_RECVER);
     _frtwv.clear();
 }
Пример #2
0
        public void Dispose()
        {
            if (_playerProc != null)
            {
                Thread.Sleep(500);                 // zantei: クライアントから停止しようとした時にマウスカーソルの位置を調整する猶予

                _playerProc.Dispose();
                _playerProc = null;

                _recverProc.Dispose();
                _recverProc = null;

                if (_crypTunnelProc != null)
                {
                    _crypTunnelProc.Dispose();
                    _crypTunnelProc = null;
                }
                _frtwv.Dispose();
                _frtwv = null;
            }
        }