Skip to content

Commit

Permalink
remove cs Sending (ccxt#23521)
Browse files Browse the repository at this point in the history
* remove cs Sending

* space
  • Loading branch information
ttodua authored Aug 24, 2024
1 parent 103a57a commit 7dbe2a0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions cs/ccxt/ws/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,26 +330,26 @@ await sendAsyncWrapper(this.webSocket, arraySegment,
CancellationToken.None);
}

private static async Task Sending(ClientWebSocket webSocket)
{
try
{
while (webSocket.State == WebSocketState.Open)
{
string message = Console.ReadLine();

if (!string.IsNullOrEmpty(message))
{
var bytes = Encoding.UTF8.GetBytes(message);
await sendAsyncWrapper(webSocket, new ArraySegment<byte>(bytes), WebSocketMessageType.Text, true, CancellationToken.None);
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Sending error: {ex.Message}");
}
}
// private static async Task Sending(ClientWebSocket webSocket)
// {
// try
// {
// while (webSocket.State == WebSocketState.Open)
// {
// string message = Console.ReadLine();

// if (!string.IsNullOrEmpty(message))
// {
// var bytes = Encoding.UTF8.GetBytes(message);
// await sendAsyncWrapper(webSocket, new ArraySegment<byte>(bytes), WebSocketMessageType.Text, true, CancellationToken.None);
// }
// }
// }
// catch (Exception ex)
// {
// Console.WriteLine($"Sending error: {ex.Message}");
// }
// }

private void TryHandleMessage (string message)
{
Expand Down

0 comments on commit 7dbe2a0

Please sign in to comment.