net.i2p.i2ptunnel.irc

## Interface DCCHelper

-     public interface DCCHelper

  Hooks to create and maintain DCC client and server tunnels

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `acceptIncoming(int port)` An incoming ACCEPT response
    `int` | `acceptOutgoing(int port)` An outgoing ACCEPT response
    `String` | `getB32Hostname()` String to put in the outgoing DCC
    `byte[]` | `getLocalAddress()` Our IP address (taken from the socket), must be IPv4
    `boolean` | `isEnabled()` Is the DCC helper enabled?
    `int` | `newIncoming(String b32, int port, String type)` An incoming DCC request
    `int` | `newOutgoing(byte[] ip, int port, String type)` An outgoing DCC request
    `int` | `resumeIncoming(int port)` An incoming RESUME request
    `int` | `resumeOutgoing(int port)` An outgoing RESUME request

- - ### Method Detail

    - #### acceptIncoming

          int acceptIncoming(int port)

      An incoming ACCEPT response
      Parameters:
        `port` - remote dcc server I2P port
      Returns:
        local DCC client tunnel port or -1 on error

    - #### acceptOutgoing

          int acceptOutgoing(int port)

      An outgoing ACCEPT response
      Parameters:
        `port` - local irc client DCC port
      Returns:
        local DCC server i2p port or -1 on error

    - #### getB32Hostname

          String getB32Hostname()

      String to put in the outgoing DCC

    - #### getLocalAddress

          byte[] getLocalAddress()

      Our IP address (taken from the socket), must be IPv4

    - #### isEnabled

          boolean isEnabled()

      Is the DCC helper enabled?

    - #### newIncoming

          int newIncoming(String b32,
                          int port,
                          String type)

      An incoming DCC request
      Parameters:
        `b32` - remote dcc server b32 address
        `port` - remote dcc server I2P port
        `type` - string
      Returns:
        local DCC client tunnel port or -1 on error

    - #### newOutgoing

          int newOutgoing(byte[] ip,
                          int port,
                          String type)

      An outgoing DCC request
      Parameters:
        `ip` - local irc client IP
        `port` - local irc client port
        `type` - string
      Returns:
        local DCC server i2p port or -1 on error

    - #### resumeIncoming

          int resumeIncoming(int port)

      An incoming RESUME request
      Parameters:
        `port` - local dcc server I2P port
      Returns:
        local IRC client DCC port or -1 on error

    - #### resumeOutgoing

          int resumeOutgoing(int port)

      An outgoing RESUME request
      Parameters:
        `port` - local DCC client tunnel port
      Returns:
        remote DCC server i2p port or -1 on error