Added debug messages to GenericTcpIpClient constructor

This commit is contained in:
Heath Volmer
2016-10-18 12:37:46 -06:00
parent 7137563e96
commit 9553dac99c
8 changed files with 21 additions and 15 deletions

View File

@@ -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;
}