public override void Dispose() { base.Dispose(); if (_socket != null) { _socket.Dispose(); _socket = null; } }
// 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(); } }