public ImageGetter(string host, NetPeerConfiguration copyConfig) { InitializeComponent(); NetPeerConfiguration config = copyConfig.Clone(); config.EnableMessageType(NetIncomingMessageType.DiscoveryResponse); Client = new NetClient(config); Client.Start(); if (!string.IsNullOrEmpty(host)) { Client.Connect(host, 14242, GetApproveData()); } else { Client.DiscoverLocalPeers(14242); } }