Package net.i2p.sam

Interface SAMMessageSess

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close a SAM message-based session.
      Destination getDestination()
      Get the SAM message-based session Destination.
      int getListenPort()  
      int getListenProtocol()  
      boolean sendBytes​(String dest, byte[] data, int proto, int fromPort, int toPort)
      Send bytes through a SAM message-based session.
      boolean sendBytes​(String dest, byte[] data, int proto, int fromPort, int toPort, boolean sendLeaseSet, int sendTags, int tagThreshold, int expiration)
      Send bytes through a SAM message-based session.
      void start()
      Start a SAM message-based session.
    • Method Detail

      • start

        void start()
        Start a SAM message-based session. MUST be called after constructor.
      • getDestination

        Destination getDestination()
        Get the SAM message-based session Destination.
        Returns:
        The SAM message-based session Destination.
      • sendBytes

        boolean sendBytes​(String dest,
                          byte[] data,
                          int proto,
                          int fromPort,
                          int toPort)
                   throws DataFormatException,
                          I2PSessionException
        Send bytes through a SAM message-based session.
        Parameters:
        dest - Destination
        data - Bytes to be sent
        Returns:
        True if the data was sent, false otherwise
        Throws:
        DataFormatException - on unknown / bad dest
        I2PSessionException - on serious error, probably session closed
      • getListenProtocol

        int getListenProtocol()
      • getListenPort

        int getListenPort()