Ejemplo n.º 1
0
 public static void Stop()
 {
     if(echoListener != null) echoListener.Close();
     if(echoResponder != null) echoResponder.Close();
     echoResponder = null;
     echoListener = null;
 }
Ejemplo n.º 2
0
 public async static Task StartMulticastResponder(string name)
 {
     if (echoResponder != null) return;
     myName = name;
     echoResponder = new MulticastSocket();
     await echoResponder.StartListening(DEFAULT_MULTICAST_GROUP, DEFAULT_MULTICAST_PORT);
     echoResponder.ConnectionReceived += discoveryRequestReceived;
 }
Ejemplo n.º 3
0
 public async static Task DiscoverDevices()
 {
     if (echoListener==null) await runDiscoveryServer();
     var discoveryEmitter = new MulticastSocket();
     await discoveryEmitter.EmmitMulticast(DEFAULT_MULTICAST_GROUP, DEFAULT_MULTICAST_PORT, DEFAULT_MULTICAST_MESSAGE);
 }