public async Task Disconnect() { this.token = null; if (this.socket != null) { await this.socket.Disconnect(); this.socket = null; } }
protected async Task <bool> InitializeInternal() { TipeeeStreamUser user = await this.GetUser(); if (user != null) { string apiKey = await this.GetAPIKey(); if (!string.IsNullOrEmpty(apiKey)) { this.socket = new TipeeeStreamWebSocketService(this, user.Username, apiKey); await this.socket.Connect(); return(this.socket.Connected); } } return(false); }