Examples of leaveGroup()


Examples of java.net.MulticastSocket.leaveGroup()

                    DatagramPacket pack = new DatagramPacket(buf, buf.length);
                    s.receive(pack);
                    System.out.println("Received data from: " + pack.getAddress().toString() +
                                       ":" + pack.getPort() + " with length: " +
                                       pack.getLength());
                    s.leaveGroup(InetAddress.getByName(group));
                    s.close();
                    canRunTests = true;
                } catch (Exception e) {
                    e.printStackTrace();
                    canRunTests = false;
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

    } finally {
      if (multicastSocket != null) {
        // Clean up the multicast socket nicely
        try {
          InetAddress upnpAddress = getUPNPAddress();
          multicastSocket.leaveGroup(upnpAddress);
        } catch (IOException e) {
        }

        multicastSocket.disconnect();
        multicastSocket.close();
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

          } finally {
            if (multicastSocket != null) {
              // Clean up the multicast socket nicely
              try {
                InetAddress upnpAddress = getUPNPAddress();
                multicastSocket.leaveGroup(upnpAddress);
              } catch (IOException e) {
              }

              multicastSocket.disconnect();
              multicastSocket.close();
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

    } finally {
      if (multicastSocket != null) {
        // Clean up the multicast socket nicely
        try {
          InetAddress upnpAddress = getUPNPAddress();
          multicastSocket.leaveGroup(upnpAddress);
        } catch (IOException e) {
        }

        multicastSocket.disconnect();
        multicastSocket.close();
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

      finally
      {
         try
         {
            if (s != null)
               s.leaveGroup(iaGroup);
         }
         catch (Exception ignore)
         {
         }
         try
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

/*      */     finally
/*      */     {
/*      */       try
/*      */       {
/* 1512 */         if (s != null)
/* 1513 */           s.leaveGroup(iaGroup);
/*      */       }
/*      */       catch (Exception ignore)
/*      */       {
/*      */       }
/*      */       try
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

      finally
      {
         try
         {
            if (s != null)
               s.leaveGroup(iaGroup);
         }
         catch (Exception ignore)
         {
         }
         try
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

        do {
            try {
                msocket.send(packet);
                synchronized(lock) {
                    if(received[0]) {
                        msocket.leaveGroup(group);
                        msocket.close();
                        return;
                    }
                }
                try {
View Full Code Here

Examples of java.net.MulticastSocket.leaveGroup()

                    e.printStackTrace();
                }
            } catch (IOException e) {
                throw new IOException("Problem creating or sending multicast packets", e);
            } finally {
                msocket.leaveGroup(group);
                msocket.close();
            }
        } while (System.currentTimeMillis() < endMillis);

        throw new IOException("Multicast packets were not received in the allotted time");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.