Code example for MulticastSocket

Methods: send

0
		    public void run() { 
		        try { 
	                System.out.println("Sending out: " + msg);
	                DatagramPacket data = new DatagramPacket(
	                        msg.getBytes(), msg.length(), group, port);
	                s.send(data);
		        } catch (Exception e) {
		            e.printStackTrace();
		        } 
		    } 
		}; 
		thread.start(); 
	} 
     
	public void displayListMessages(){ 
        String[] simpleArray = new String[ messages.size() ];
        messages.toArray( simpleArray );
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, simpleArray);
		setListAdapter(adapter);
	} 
Connect your IDE to all the code out there  Get Codota for Java