Package com.ngrok

Interface Connection

    • Method Detail

      • getRemoteAddr

        String getRemoteAddr()
        Returns the remote address that established this connection.
        Returns:
        an internet address, in IP:port form
      • read

        int read​(ByteBuffer dst)
          throws IOException
        Reads the next available bytes from this connection, up to the buffer capacity.
        Parameters:
        dst - the buffer to read bytes into
        Returns:
        the number of bytes read, or -1 if the end of the stream has been reached
        Throws:
        IOException - if an I/O error occurs
      • write

        int write​(ByteBuffer src)
           throws IOException
        Writes a sequence of bytes to this connection from the given buffer.
        Parameters:
        src - the buffer containing bytes to write
        Returns:
        the number of bytes written
        Throws:
        IOException - if an I/O error occurs
      • close

        void close()
            throws IOException
        Closes this connection and releases any system resources associated with it.
        Specified by:
        close in interface AutoCloseable
        Throws:
        IOException - if an I/O error occurs