Пример #1
0
        /// <summary>
        /// Connects to the specified URI.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <returns></returns>
        public bool Connect(Uri uri)
        {
            WebSocketTask task = ConnectAsync(socketUri = uri);

            task.Wait(ConnectTimeout);
            return(task.IsSuccess());
        }
Пример #2
0
        /// <summary>
        /// Disconnects this socket.
        /// </summary>
        public void Disconnect()
        {
            WebSocketTask task = DisconnectAsync();

            task.Wait(DisconnectTimeout);
        }