public Client(ClientForm clientForm) { this.clientForm = clientForm; client = new UdpClient(); multicastAddress = IPAddress.Parse("239.0.0.222"); ipEndPoint = new IPEndPoint(IPAddress.Any, 2222); client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); client.ExclusiveAddressUse = false; client.Client.Bind(ipEndPoint); client.JoinMulticastGroup(multicastAddress); }