src/main/java/org/tinyradius/util/RadiusClient.java
protected DatagramPacket makeDatagramPacket(RadiusPacket packet, int port)
        throws IOException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        packet.encodeRequestPacket(bos, getSharedSecret());
        byte[] data = bos.toByteArray();

        InetAddress address = InetAddress.getByName(getHostName());
        DatagramPacket datagram = new DatagramPacket(data, data.length, address, port);
        return datagram;
    }
/**
     * Creates a datagram packet from a RadiusPacket to be send.
     *
     * @param packet RadiusPacket
     * @param port   destination port number
     * @return new datagram packet
     * @throws IOException
     */
Creates a datagram packet from a RadiusPacket to be send.

@param packet RadiusPacket
@param port   destination port number
@return new datagram packet
@throws IOException
Creates a datagram packet from a RadiusPacket to be send . @param packet RadiusPacket @param port destination port number @return new datagram packet @throws IOException
protected DatagramPacket makeDatagramPacket(RadiusPacket packet, int port)
        throws IOException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        packet.encodeRequestPacket(bos, getSharedSecret());
        byte[] data = bos.toByteArray();
        InetAddress address = InetAddress.getByName(getHostName());
        DatagramPacket datagram = new DatagramPacket(data, data.length, address, port);
        return datagram;
    }
protected DatagramPacket makeDatagramPacket ( RadiusPacket packet , int port ) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; packet . encodeRequestPacket ( bos , getSharedSecret ( ) ) ; byte [ ] data = bos . toByteArray ( ) ; InetAddress address = InetAddress . getByName ( getHostName ( ) ) ; DatagramPacket datagram = new DatagramPacket ( data , data . length , address , port ) ; return datagram ; }
Creates a datagram packet from a RadiusPacket to be send.
Creates a datagram packet from a RadiusPacket to be send .