コード例 #1
0
        public async Task Dispose()
        {
            try
            {
                if (_dispose)
                {
                    return;
                }

                _dispose = true;

                HttpLogger?.Dispose();

                await SendText("close");

                webSocket?.Dispose();

                Thread.Sleep(1000);

                ReceiveHttpAction();
            }
            catch (Exception)
            {
            }
        }
コード例 #2
0
ファイル: WebSocketHelper.cs プロジェクト: yuzd/AntDeploy
        public async Task Dispose()
        {
            try
            {
                if (_dispose)
                {
                    return;
                }

                _dispose = true;

                mDetectionTimer?.Dispose();

                HttpLogger?.Dispose();

                await SendText("close");

                webSocket?.Dispose();

                Thread.Sleep(1000);

                ReceiveHttpAction();
            }
            catch
            {
                //ignore
            }
            finally
            {
                try
                {
                    client.Dispose();
                }
                catch
                {
                    //ignore
                }
            }
        }
コード例 #3
0
ファイル: WebSocketHelper.cs プロジェクト: yuzd/AntDeploy
 public WebSocketClient(Logger _receiveAction, HttpLogger _loggerKey)
 {
     this.receiveAction = _receiveAction;
     this.HttpLogger    = _loggerKey;
     client             = new WebClientExtended();
 }
コード例 #4
0
 public WebSocketClient(Logger _receiveAction, HttpLogger _loggerKey)
 {
     this.receiveAction = _receiveAction;
     this.HttpLogger    = _loggerKey;
 }