- All Known Implementing Classes:
I2PTunnelIRCClient.DCC
public interface DCCHelper
Hooks to create and maintain DCC client and server tunnels.
Method Summary
All MethodsModifier and TypeMethodDescriptionintacceptIncoming(int port) An incoming ACCEPT response.intacceptOutgoing(int port) An outgoing ACCEPT response.String to put in the outgoing DCC.byte[]Our IP address (taken from the socket), must be IPv4.booleanIs the DCC helper enabled?intnewIncoming(String b32, int port, String type) An incoming DCC request.intnewOutgoing(byte[] ip, int port, String type) An outgoing DCC request.intresumeIncoming(int port) An incoming RESUME request.intresumeOutgoing(int port) An outgoing RESUME request.
Method Details
isEnabled
boolean isEnabled()Is the DCC helper enabled?- Returns:
- true if enabled
getB32Hostname
getLocalAddress
byte[] getLocalAddress()Our IP address (taken from the socket), must be IPv4.- Returns:
- the local IP address bytes
newOutgoing
An outgoing DCC request.- Parameters:
ip- local irc client IPport- local irc client porttype- string- Returns:
- local DCC server i2p port or -1 on error
newIncoming
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
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
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
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