Code example for SocketException

Methods: getMessage, printStackTrace

0
				Log.d("SERVER", "Listening at: " + socket.getLocalAddress());
				//socket.connect(InetAddress.getByName(ipAddress), portNumber); 
				//Log.d("SERVER", "Listening at: " + socket.getInetAddress().getHostAddress()); 
			} 
			catch(SocketException e){
				e.printStackTrace();
				Log.d("VoiceServer", "Exception has occured trying open a socket.");
				Log.d("VoiceServer", "Details:" + e.getMessage());
			} 
		} 
		 
		@Override 
		public void run() { 
			android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
			try { 
				//long i =0; 
				 
				 
				while(running){
					//Log.d("SERVER", "Waiting for packet..."); 
					DatagramPacket packet = new DatagramPacket(buffer, buffer.length);