diff --git a/src/Abstract/Client.cs b/src/Abstract/Client.cs index 5755f380..f7d8013e 100644 --- a/src/Abstract/Client.cs +++ b/src/Abstract/Client.cs @@ -14,7 +14,7 @@ public abstract class Client : IClient public bool Framing { get; protected set; } public string UUID { get; protected set; } - public Host Host { get; protected set; } + public Host Host { get; protected set; } = Host.Default; public bool IsOpened => IsConnected(); diff --git a/src/Abstract/Server.cs b/src/Abstract/Server.cs index 268abc51..a7f0a400 100644 --- a/src/Abstract/Server.cs +++ b/src/Abstract/Server.cs @@ -10,7 +10,7 @@ public abstract class Server { #region Props public bool Framing { get; protected set; } - public Host Host { get; protected set; } + public Host Host { get; protected set; } = Host.Default; public List Clients { get; protected set; } = new List(); public bool IsOpened => IsConnected(); diff --git a/src/Udp/UdpClient.cs b/src/Udp/UdpClient.cs index 9549e1af..a044883e 100644 --- a/src/Udp/UdpClient.cs +++ b/src/Udp/UdpClient.cs @@ -25,7 +25,7 @@ public class UdpClient : IUdpClient /// /// Host container /// - public Host Host { get; private set; } + public Host Host { get; private set; } = Host.Default; /// /// Return true when connection is enabled (using ping) @@ -69,7 +69,6 @@ public UdpClient(bool useConnection, int timeout = _DEFAULT_TIMEOUT_VALUE) _opened = false; _serverside = false; _socket = null; - Host = new Host(IPAddress.Loopback, 0); Init(); } diff --git a/src/Udp/UdpServer.cs b/src/Udp/UdpServer.cs index 0a3eef36..51cbfa66 100644 --- a/src/Udp/UdpServer.cs +++ b/src/Udp/UdpServer.cs @@ -16,7 +16,7 @@ public class UdpServer : IUdpServer /// /// Host container /// - public Host Host { get; private set; } + public Host Host { get; private set; } = Host.Default; /// /// Connection timeout