Package org.xbill.DNS

Class NioTcpClient

java.lang.Object
org.xbill.DNS.NioClient
org.xbill.DNS.NioTcpClient
All Implemented Interfaces:
TcpIoClient

final class NioTcpClient extends NioClient implements TcpIoClient
  • Field Details

  • Constructor Details

    • NioTcpClient

      NioTcpClient()
  • Method Details

    • processPendingRegistrations

      private void processPendingRegistrations(Selector selector)
    • checkTransactionTimeouts

      private void checkTransactionTimeouts()
    • closeTcp

      private void closeTcp()
    • sendAndReceiveTcp

      public CompletableFuture<byte[]> sendAndReceiveTcp(InetSocketAddress local, InetSocketAddress remote, Message query, byte[] data, Duration timeout)
      Description copied from interface: TcpIoClient
      Sends a query to a remote server and returns the answer.
      Specified by:
      sendAndReceiveTcp in interface TcpIoClient
      Parameters:
      local - Address from which the connection is coming. may be null and the implementation must decide on the local address.
      remote - Address that the connection should send the data to.
      query - DNS message representation of the outbound query.
      data - Raw byte representation of the outbound query.
      timeout - Duration before the connection will time out and be closed.
      Returns:
      A CompletableFuture that will be completed with the byte value of the response.