Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into NET6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveOrDevTrying committed Jul 10, 2023
2 parents e998b55 + 6da5517 commit cceda10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Tcp.NET.Client/Handlers/TcpClientHandlerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override async Task<bool> ConnectAsync(CancellationToken cancellationToke
}
else
{
await CreateNonSSLConnectionAsync(cancellationToken).ConfigureAwait(false);
await CreateConnectionAsync(cancellationToken).ConfigureAwait(false);
}

if (_connection != null && _connection.TcpClient.Connected && !cancellationToken.IsCancellationRequested)
Expand Down Expand Up @@ -162,9 +162,9 @@ public override async Task<bool> SendAsync(string message, CancellationToken can
Bytes = bytes,
CancellationToken = cancellationToken
}));

return true;
}

return true;
}
catch (Exception ex)
{
Expand Down Expand Up @@ -212,9 +212,9 @@ public override async Task<bool> SendAsync(byte[] message, CancellationToken can
Bytes = bytes,
CancellationToken = cancellationToken
}));

return true;
}

return true;
}
catch (Exception ex)
{
Expand Down Expand Up @@ -349,7 +349,7 @@ protected virtual async Task ReceiveAsync(CancellationToken cancellationToken)
await DisconnectAsync(cancellationToken).ConfigureAwait(false);
}

protected virtual async Task CreateNonSSLConnectionAsync(CancellationToken cancellationToken)
protected virtual async Task CreateConnectionAsync(CancellationToken cancellationToken)
{
// Establish the remote endpoint for the socket.
_connection?.Dispose();
Expand Down
8 changes: 4 additions & 4 deletions Tcp.NET.Server/Handlers/TcpHandlerServerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ public override async Task<bool> SendAsync(string message, Z connection, Cancell
Bytes = bytes,
CancellationToken = cancellationToken
}));

return true;
}

return true;
}
catch (Exception ex)
{
Expand Down Expand Up @@ -421,9 +421,9 @@ public override async Task<bool> SendAsync(byte[] message, Z connection, Cancell
Bytes = bytes,
CancellationToken = cancellationToken
}));

return true;
}

return true;
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion TestApps/Tcp.NET.TestApps.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private static void OnMessageEvent(object sender, TcpMessageClientEventArgs args
case MessageEventType.Sent:
break;
case MessageEventType.Receive:
//Console.WriteLine(args.Message + " : " + +_clients.Values.Where(x => x.IsRunning).Count());
Console.WriteLine(args.Message + " : " + +_clients.Values.Where(x => x.IsRunning).Count());
break;
default:
break;
Expand Down

0 comments on commit cceda10

Please sign in to comment.