/// <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()); }
/// <summary> /// Disconnects this socket. /// </summary> public void Disconnect() { WebSocketTask task = DisconnectAsync(); task.Wait(DisconnectTimeout); }