mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-15 12:44:48 +00:00
Added debug messages to GenericTcpIpClient constructor
This commit is contained in:
@@ -86,6 +86,19 @@ namespace PepperDash.Core
|
||||
public GenericTcpIpClient(string key, string address, int port, int bufferSize)
|
||||
: base(key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(address))
|
||||
{
|
||||
Debug.Console(1, Debug.ErrorLogLevel.Warning, "GenericTcpIpClient '{0}': No address set", key);
|
||||
return;
|
||||
}
|
||||
if (port < 1 || port > 65535)
|
||||
{
|
||||
{
|
||||
Debug.Console(1, Debug.ErrorLogLevel.Warning, "GenericTcpIpClient '{0}': Invalid port", key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Client = new TCPClient(address, port, bufferSize);
|
||||
Client.SocketStatusChange += Client_SocketStatusChange;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user