Code example for DatagramSocket

Methods: getLocalAddress, getLocalPort

0
	} 
 
	/* Get details of socket */ 
	public InetSocketAddress T_getLocalSocketAddress() 
	{ 
		return(new InetSocketAddress(d_socket.getLocalAddress(), d_socket.getLocalPort()));
	} 
 
	/* Send data */ 
	/* len is <= the space allocated for buf */ 
	public void T_sendto(byte buf[], int len, InetSocketAddress to) throws IOException
	{ 
		DatagramPacket p = new DatagramPacket(buf, len, to);
 
		if(DEBUG)
		{ 
		    System.out.println("T_send "+len);
		} 
		 
		if(invokeSRand)
		{