Code example for InetAddress

Methods: getHostName

0
	      byte[] receiveData = new byte[100];
 
		  public SenderThread(InetAddress address, int port) throws SocketException {		  	
			  	this.server = address;
		    	this.port = port;
		    	Log.i(TAG, "UDP Sender sending to "+address.getHostName()+":"+port);
		  } 
 
 
		  public void run() { 
			Log.e(TAG, "Starting UDP Server Thread");
			udpSeqNumber = 0;
		       
		    try { 
				DatagramSocket clientSocket = new DatagramSocket();
				clientSocket.setSoTimeout(1000);
 
		      while (testAlive) {
		    	  try{ 
		    	  	//Info sent to server (hostname;timestamp;jitter) + -1 indicating start RTT test 
Experience pair programming with AI  Get Codota for Java