public virtual void Open()
        {
            if (localhost == null)
            {
                SetupCustomPeerResolverServiceHost();
            }

            if ((CleanupInterval == TimeSpan.Zero) || (RefreshInterval == TimeSpan.Zero))
            {
                throw new ArgumentException("Cleanup interval or refresh interval are set to a time span interval of zero.");
            }

            if (opened)
            {
                throw new InvalidOperationException("The service has been started by a previous call to this method.");
            }

            opened = true;

            client.Open();
            client.SetCustomServiceSettings(new PeerServiceSettingsInfo()
            {
                ControlMeshShape = control_shape, RefreshInterval = refresh_interval, CleanupInterval = cleanup_interval
            });
        }