All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xbill.DNS.PacketLogger Maven / Gradle / Ivy

There is a newer version: 3.6.2_1
Show newest version
// SPDX-License-Identifier: BSD-2-Clause
package org.xbill.DNS;

import java.net.SocketAddress;

/**
 * Custom logger that can log all packets that were sent or received.
 *
 * @author Damian Minkov
 */
public interface PacketLogger {
  /**
   * Logs data (usually a DNS message in wire format) that was sent or received within the dnsjava
   * library.
   *
   * 

This method can be invoked concurrently from any thread. * * @param prefix a note of where the package originated, e.g. {@code TCP read}. * @param local the local (i.e. this pc) socket address of the communication channel. * @param remote the remote (i.e. the server) socket address of the communication channel. * @param data the transferred data, usually a complete DNS message. */ void log(String prefix, SocketAddress local, SocketAddress remote, byte[] data); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy