public HostBuilder(HostBuilder host)
{
if (host!=null) {
SessionID = host.SessionID;
BroadcastID = host.BroadcastID;
LocalEndPoint = host.LocalEndPoint;
GlobalEndPoint = host.GlobalEndPoint;
RelayCount = host.RelayCount;
DirectCount = host.DirectCount;
IsFirewalled = host.IsFirewalled;
IsTracker = host.IsTracker;
IsRelayFull = host.IsRelayFull;
IsDirectFull = host.IsDirectFull;
IsReceiving = host.IsReceiving;
IsControlFull = host.IsControlFull;
Extensions = new List<string>(host.Extensions);
Extra = new AtomCollection(host.Extra);
}
else {
SessionID = Guid.Empty;
BroadcastID = Guid.Empty;
LocalEndPoint = null;
GlobalEndPoint = null;
RelayCount = 0;
DirectCount = 0;
IsFirewalled = false;
IsTracker = false;
IsRelayFull = false;
IsDirectFull = false;
IsReceiving = false;
IsControlFull = false;
Extensions = new List<string>();
Extra = new AtomCollection();
}
}
}