Code example for MulticastSocket

Methods: close

0
    public void onDestroy(){ 
    	super.onDestroy(); 
    	//TODO  
    	//Close record file 
    	//Close socket 
    	ms.close();
    	// Close the receiver thread 
    	receiverRunning = false;
    } 
     
    private void initializeGUI() { 
		ll = new LinearLayout(this);
		ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));
		ll.setOrientation(LinearLayout.VERTICAL);
 
		startAsSender = new Button(this);
		startAsSender.setText("Start As Sender");
		ll.addView(startAsSender);
		startAsReceiver = new Button(this);
		startAsReceiver.setText("Start As Receiver");