public void Start() { mcastHost = new MulticastHost(localEndpoint); mcastHost.MessageReceived += mcastHost_MessageReceived; mcastHost.Start(); mcastHost.Send(serverEndpoint, new RegisterMessage() { Sender = localEndpoint }); }
public void Stop() { if (mcastHost != null) { mcastHost.Send(serverEndpoint, new UnregisterMessage() { Sender = localEndpoint }); mcastHost.Dispose(); mcastHost = null; } }