Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into NETCore2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveOrDevTrying committed Mar 6, 2024
2 parents 4b83a5a + 2d425d5 commit 656e431
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Tcp.NET.Client/Handlers/TcpClientHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class TcpClientHandler :
TcpConnectionClientEventArgs,
TcpMessageClientEventArgs,
TcpErrorClientEventArgs,
ParamsTcpClient,
IParamsTcpClient,
ConnectionTcp>
{
public TcpClientHandler(ParamsTcpClient parameters) : base(parameters)
public TcpClientHandler(IParamsTcpClient parameters) : base(parameters)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Tcp.NET.Client/Handlers/TcpClientHandlerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public abstract class TcpClientHandlerBase<T, U, V, W, Y> :
where T : TcpConnectionEventArgs<Y>
where U : TcpMessageEventArgs<Y>
where V : TcpErrorEventArgs<Y>
where W : ParamsTcpClient
where W : IParamsTcpClient
where Y : ConnectionTcp
{
public TcpClientHandlerBase(W parameters) : base(parameters)
Expand Down
2 changes: 1 addition & 1 deletion Tcp.NET.Client/Models/ParamsTcpClientBytes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ParamsTcpClientBytes : IParamsTcpClient
public bool UseDisconnectBytes { get; protected set; }
public byte[] DisconnectBytes { get; protected set; }

public ParamsTcpClientBytes(string host, int port, byte[] endOfLineBytes, byte[] token = null, bool isSSL = true, bool onlyEmitBytes = true, bool usePingPong = true, byte[] pingBytes = null, byte[] pongBytes = null, bool useDisconnectBytes = true, byte[] disconnectBytes = null)
public ParamsTcpClientBytes(string host, int port, byte[] endOfLineBytes, byte[] token = null, bool isSSL = true, bool onlyEmitBytes = false, bool usePingPong = true, byte[] pingBytes = null, byte[] pongBytes = null, bool useDisconnectBytes = true, byte[] disconnectBytes = null)
{
if (string.IsNullOrWhiteSpace(host))
{
Expand Down
4 changes: 2 additions & 2 deletions Tcp.NET.Client/TcpNETClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public class TcpNETClient :
TcpConnectionClientEventArgs,
TcpMessageClientEventArgs,
TcpErrorClientEventArgs,
ParamsTcpClient,
IParamsTcpClient,
TcpClientHandler,
ConnectionTcp>,
ITcpNETClient
{
public TcpNETClient(ParamsTcpClient parameters) : base(parameters)
public TcpNETClient(IParamsTcpClient parameters) : base(parameters)
{
}

Expand Down
6 changes: 3 additions & 3 deletions Tcp.NET.Server/Handlers/TcpHandlerServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ public class TcpHandlerServer :
TcpConnectionServerEventArgs,
TcpMessageServerEventArgs,
TcpErrorServerEventArgs,
ParamsTcpServer,
IParamsTcpServer,
ConnectionTcpServer>
{
public TcpHandlerServer(ParamsTcpServer parameters) : base(parameters)
public TcpHandlerServer(IParamsTcpServer parameters) : base(parameters)
{
}
public TcpHandlerServer(ParamsTcpServer parameters, byte[] certificate, string certificatePassword) : base(parameters, certificate, certificatePassword)
public TcpHandlerServer(IParamsTcpServer parameters, byte[] certificate, string certificatePassword) : base(parameters, certificate, certificatePassword)
{
}

Expand Down
6 changes: 3 additions & 3 deletions Tcp.NET.Server/Handlers/TcpHandlerServerAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public class TcpHandlerServerAuth<T> :
TcpConnectionServerAuthEventArgs<T>,
TcpMessageServerAuthEventArgs<T>,
TcpErrorServerAuthEventArgs<T>,
ParamsTcpServerAuth,
IParamsTcpServerAuth,
TcpAuthorizeEventArgs<T>,
IdentityTcpServer<T>,
T>
{
public TcpHandlerServerAuth(ParamsTcpServerAuth parameters) : base(parameters)
public TcpHandlerServerAuth(IParamsTcpServerAuth parameters) : base(parameters)
{
}
public TcpHandlerServerAuth(ParamsTcpServerAuth parameters, byte[] certificate, string certificatePassword) : base(parameters, certificate, certificatePassword)
public TcpHandlerServerAuth(IParamsTcpServerAuth parameters, byte[] certificate, string certificatePassword) : base(parameters, certificate, certificatePassword)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Tcp.NET.Server/Handlers/TcpHandlerServerAuthBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public abstract class TcpHandlerServerAuthBase<T, U, V, W, X, Z, A> :
where T : TcpConnectionServerAuthBaseEventArgs<Z, A>
where U : TcpMessageServerAuthBaseEventArgs<Z, A>
where V : TcpErrorServerAuthBaseEventArgs<Z, A>
where W : ParamsTcpServerAuth
where W : IParamsTcpServerAuth
where X : TcpAuthorizeBaseEventArgs<Z, A>
where Z : IdentityTcpServer<A>
{
Expand Down
2 changes: 1 addition & 1 deletion Tcp.NET.Server/Handlers/TcpHandlerServerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class TcpHandlerServerBase<T, U, V, W, Z> :
where T : TcpConnectionServerBaseEventArgs<Z>
where U : TcpMessageServerBaseEventArgs<Z>
where V : TcpErrorServerBaseEventArgs<Z>
where W : ParamsTcpServer
where W : IParamsTcpServer
where Z : ConnectionTcpServer
{
protected TcpListener _server;
Expand Down
7 changes: 7 additions & 0 deletions Tcp.NET.Server/Models/IParamsTcpServerAuth.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Tcp.NET.Server.Models
{
public interface IParamsTcpServerAuth : IParamsTcpServer
{
string ConnectionUnauthorizedString { get; }
}
}
2 changes: 1 addition & 1 deletion Tcp.NET.Server/Models/ParamsTcpServerAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Tcp.NET.Server.Models
{
public class ParamsTcpServerAuth : ParamsTcpServer
public class ParamsTcpServerAuth : ParamsTcpServer, IParamsTcpServerAuth
{
public string ConnectionUnauthorizedString { get; protected set; }

Expand Down
4 changes: 2 additions & 2 deletions Tcp.NET.Server/Models/ParamsTcpServerAuthBytes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Tcp.NET.Server.Models
{
public class ParamsTcpServerAuthBytes : ParamsTcpServerBytes
public class ParamsTcpServerAuthBytes : ParamsTcpServerBytes, IParamsTcpServerAuth
{
public string ConnectionUnauthorizedString { get; protected set; }

public ParamsTcpServerAuthBytes(int port, byte[] endOfLineBytes, string connectionSuccessString = null, string connectionUnauthorizedString = null, bool onlyEmitBytes = false, int pingIntervalSec = 120, byte[] pingBytes = null, byte[] pongBytes = null, bool sendDisconnectBytes = true, byte[] disconnectBytes = null) : base(port, endOfLineBytes, connectionSuccessString, onlyEmitBytes, pingIntervalSec, pingBytes, pongBytes, sendDisconnectBytes, disconnectBytes)
{
if (onlyEmitBytes && !string.IsNullOrWhiteSpace(connectionUnauthorizedString))
{
throw new ArgumentException("onlyEmitBytes can not be true is a connectionUnauthorizedString is specified");
throw new ArgumentException("onlyEmitBytes can not be true if a connectionUnauthorizedString is specified");
}

ConnectionUnauthorizedString = connectionUnauthorizedString;
Expand Down
6 changes: 3 additions & 3 deletions Tcp.NET.Server/TcpNETServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ public class TcpNETServer :
TcpConnectionServerEventArgs,
TcpMessageServerEventArgs,
TcpErrorServerEventArgs,
ParamsTcpServer,
IParamsTcpServer,
TcpHandlerServer,
TcpConnectionManager,
ConnectionTcpServer>,
ITcpNETServer
{
public TcpNETServer(ParamsTcpServer parameters) : base(parameters)
public TcpNETServer(IParamsTcpServer parameters) : base(parameters)
{
}

public TcpNETServer(ParamsTcpServer parameters,
public TcpNETServer(IParamsTcpServer parameters,
byte[] certificate,
string certificatePassword) : base(parameters, certificate, certificatePassword)
{
Expand Down
6 changes: 3 additions & 3 deletions Tcp.NET.Server/TcpNETServerAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ public class TcpNETServerAuth<T> :
TcpConnectionServerAuthEventArgs<T>,
TcpMessageServerAuthEventArgs<T>,
TcpErrorServerAuthEventArgs<T>,
ParamsTcpServerAuth,
IParamsTcpServerAuth,
TcpHandlerServerAuth<T>,
TcpConnectionManagerAuth<T>,
IdentityTcpServer<T>,
T,
TcpAuthorizeEventArgs<T>>,
ITcpNETServerAuth<T>
{
public TcpNETServerAuth(ParamsTcpServerAuth parameters,
public TcpNETServerAuth(IParamsTcpServerAuth parameters,
IUserService<T> userService) : base(parameters, userService)
{
}
public TcpNETServerAuth(ParamsTcpServerAuth parameters,
public TcpNETServerAuth(IParamsTcpServerAuth parameters,
IUserService<T> userService,
byte[] certificate,
string certificatePassword) : base(parameters, userService, certificate, certificatePassword)
Expand Down
2 changes: 1 addition & 1 deletion Tcp.NET.Server/TcpNETServerAuthBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public abstract class TcpNETServerAuthBase<T, U, V, W, X, Y, Z, A, B> :
where T : TcpConnectionServerAuthBaseEventArgs<Z, A>
where U : TcpMessageServerAuthBaseEventArgs<Z, A>
where V : TcpErrorServerAuthBaseEventArgs<Z, A>
where W : ParamsTcpServerAuth
where W : IParamsTcpServerAuth
where X : TcpHandlerServerAuthBase<T, U, V, W, B, Z, A>
where Y : ConnectionManagerAuth<Z, A>
where Z : IdentityTcpServer<A>
Expand Down
2 changes: 1 addition & 1 deletion Tcp.NET.Server/TcpNETServerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class TcpNETServerBase<T, U, V, W, X, Y, Z> :
where T : TcpConnectionServerBaseEventArgs<Z>
where U : TcpMessageServerBaseEventArgs<Z>
where V : TcpErrorServerBaseEventArgs<Z>
where W : ParamsTcpServer
where W : IParamsTcpServer
where X : TcpHandlerServerBase<T, U, V, W, Z>
where Y : ConnectionManager<Z>
where Z : ConnectionTcpServer
Expand Down

0 comments on commit 656e431

Please sign in to comment.