Beispiel #1
0
        public async Task Disconnect()
        {
            this.token = null;
            if (this.socket != null)
            {
                await this.socket.Disconnect();

                this.socket = null;
            }
        }
Beispiel #2
0
        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);
        }