Code example for DatagramSocket

Methods: setBroadcastsetSoTimeout

0
	} 
	 
	public synchronized void setup() throws SocketException 
	{ 
		Log.i(TAG, "Setting up, socketing");
		socket = new DatagramSocket(PORT_NO);
		socket.setBroadcast(true);
	    socket.setSoTimeout(TIMEOUT);
	} 
	 
	public synchronized void teardown() 
	{ 
		threadHandler.post(new Runnable()
		{ 
			public void run() 
			{ 
				Looper.myLooper().quit();
			} 
		}); 
	} 
Experience pair programming with AI  Get Codota for Java