Skip to content

Commit

Permalink
Merge pull request #1 from emre-pehlivan/master
Browse files Browse the repository at this point in the history
ripple client add method - websocket state
  • Loading branch information
farukterzioglu authored Feb 11, 2021
2 parents c003adb + a7c1c2a commit c4ab42c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/RippleDotNet/IRippleClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace RippleDotNet
{
public interface IRippleClient
{
WebSocketState ClientState();

void Connect();

void Disconnect();
Expand Down Expand Up @@ -136,10 +138,15 @@ public RippleClient(string url)
public void Connect()
{
client.Connect();
do
{
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
} while (client.State != WebSocketState.Open);
//do
//{
// System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
//} while (client.State != WebSocketState.Open);
}

public WebSocketState ClientState()
{
return client.State;
}

public void Disconnect()
Expand Down

0 comments on commit c4ab42c

Please sign in to comment.