Code example for DatagramSocket

Methods: close, disconnect, isConnected

0
	 */ 
	public void dispose() { 
		isRunning = false;
		_myThread = null;
		if (_myDatagramSocket != null) {
			if (_myDatagramSocket.isConnected()) {
				Logger.printDebug("UdpServer.dispose()", "disconnect()"); 
				_myDatagramSocket.disconnect();
			} 
			Logger.printDebug("UdpServer.dispose()", "close()"); 
			_myDatagramSocket.close();
			_myDatagramSocket = null;
			Logger.printDebug("UdpServer.dispose()", 
					"Closing unicast datagram socket."); 
		} 
	} 
 
	/** 
	 * send a byte array to a previously defined remoteAddress. 
	 *  
	 * @param theBytes