Class HostLookupMessage

  • All Implemented Interfaces:
    I2CPMessage

    public class HostLookupMessage
    extends I2CPMessageImpl
    Request the router look up the dest for a hash or a host. Replaces DestLookupMessage.
    Since:
    0.9.11; do not send to routers older than 0.9.11.
    • Constructor Detail

      • HostLookupMessage

        public HostLookupMessage()
      • HostLookupMessage

        public HostLookupMessage​(SessionId id,
                                 Hash h,
                                 long reqID,
                                 long timeout)
        Parameters:
        reqID - 0 to 2**32 - 1
        timeout - ms 1 to 2**32 - 1
      • HostLookupMessage

        public HostLookupMessage​(SessionId id,
                                 String host,
                                 long reqID,
                                 long timeout)
        Parameters:
        reqID - 0 to 2**32 - 1
        timeout - ms 1 to 2**32 - 1
    • Method Detail

      • getSessionId

        public SessionId getSessionId()
      • sessionId

        public SessionId sessionId()
        Return the SessionId for this message.
        Specified by:
        sessionId in interface I2CPMessage
        Overrides:
        sessionId in class I2CPMessageImpl
        Returns:
        null always. Extending classes with a SessionId must override.
        Since:
        0.9.21
      • getReqID

        public long getReqID()
        Returns:
        0 to 2**32 - 1
      • getTimeout

        public long getTimeout()
        Returns:
        ms 1 to 2**32 - 1
      • getLookupType

        public int getLookupType()
        Returns:
        0 (hash) or 1 (host)
      • getHash

        public Hash getHash()
        Returns:
        only valid if lookup type == 0
      • getHostname

        public String getHostname()
        Returns:
        only valid if lookup type == 1
      • getType

        public int getType()
        Description copied from interface: I2CPMessage
        Return the unique identifier for this type of message, as specified in the network specification document under #ClientAccessLayerMessages
        Returns:
        unique identifier for this type of message