src/main/java/org/tinyradius/util/RadiusServer.java
protected DatagramPacket makeDatagramPacket(RadiusPacket packet, String secret, InetAddress address, int port,
                                                RadiusPacket request)
        throws IOException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        packet.encodeResponsePacket(bos, secret, request);
        byte[] data = bos.toByteArray();

        DatagramPacket datagram = new DatagramPacket(data, data.length, address, port);
        return datagram;
    }
/**
     * Creates a Radius response datagram packet from a RadiusPacket to be send.
     *
     * @param packet  RadiusPacket
     * @param secret  shared secret to encode packet
     * @param address where to send the packet
     * @param port    destination port
     * @param request request packet
     * @return new datagram packet
     * @throws IOException
     */
Creates a Radius response datagram packet from a RadiusPacket to be send.


Creates a Radius response datagram packet from a RadiusPacket to be send .
protected DatagramPacket makeDatagramPacket(RadiusPacket packet, String secret, InetAddress address, int port,
                                                RadiusPacket request)
        throws IOException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        packet.encodeResponsePacket(bos, secret, request);
        byte[] data = bos.toByteArray();
        DatagramPacket datagram = new DatagramPacket(data, data.length, address, port);
        return datagram;
    }
protected DatagramPacket makeDatagramPacket ( RadiusPacket packet , String secret , InetAddress address , int port , RadiusPacket request ) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; packet . encodeResponsePacket ( bos , secret , request ) ; byte [ ] data = bos . toByteArray ( ) ; DatagramPacket datagram = new DatagramPacket ( data , data . length , address , port ) ; return datagram ; }
Creates a Radius response datagram packet from a RadiusPacket to be send.
Creates a Radius response datagram packet from a RadiusPacket to be send .