Package org.xbill.DNS

Class TcpKeepaliveOption

java.lang.Object
org.xbill.DNS.EDNSOption
org.xbill.DNS.TcpKeepaliveOption

public class TcpKeepaliveOption extends EDNSOption
TCP Keepalive EDNS0 Option, as defined in https://datatracker.ietf.org/doc/html/rfc7828
Author:
Klaus Malorny
See Also:
  • Constructor Details

    • TcpKeepaliveOption

      public TcpKeepaliveOption()
      Constructor for an option with no timeout
    • TcpKeepaliveOption

      public TcpKeepaliveOption(int t)
      Constructor for an option with a given timeout.
      Parameters:
      t - the timeout time in 100ms units, may not be negative or larger than 65535
    • TcpKeepaliveOption

      public TcpKeepaliveOption(Duration t)
      Constructor for an option with a given timeout. As the timeout has a coarser granularity than the Duration class, values are rounded down.
      Parameters:
      t - the timeout time, must not be negative and must be lower than 6553.5 seconds
  • Method Details

    • getTimeout

      public OptionalInt getTimeout()
      Returns the timeout.
      Returns:
      the timeout in 100ms units
    • getTimeoutDuration

      public Optional<Duration> getTimeoutDuration()
      Returns the timeout as a Duration.
      Returns:
      the timeout