コード例 #1
0
        public override void Dispose()
        {
            base.Dispose();

            if (_socket != null)
            {
                _socket.Dispose();
                _socket = null;
            }
        }
コード例 #2
0
        // token for the websocket
        public WebSocketEndPoint(string endPoint, EndPointOptions options)  :
            base(MakeHttpEndpoint(endPoint), options)
        {
            _wsUrl  = new EB.Uri(endPoint);
            _socket = new Net.TalkWebSocket();
            _socket.ActivityTimeout = options.ActivityTimeout;
            _socket.OnError        += OnError;

            if (options.KeepAlive)
            {
                ConnectIfNeeded();
            }
        }