java.lang.Object
net.i2p.i2ptunnel.irc.IrcInboundFilter
All Implemented Interfaces:
Runnable

public class IrcInboundFilterextends Object implements Runnable
Thread to do inbound filtering. Moved from I2PTunnelIRCClient.java.
  • Field Details

    • local

      private final Socket local
      The local IRC client's socket.
    • remote

      private final I2PSocket remote
      The I2P socket to the IRC server.
    • expectedPong

      private final StringBuffer expectedPong
      The PONG reply awaited from the client.
    • _log

      private final Log _log
      Logger for this class.
    • _dccHelper

      private final DCCHelper _dccHelper
      Rewrites DCC lines for I2P addresses.
  • Constructor Details

    • IrcInboundFilter

      public IrcInboundFilter(Socket lcl, I2PSocket rem, StringBuffer pong, Log log)
      Create an inbound filter without DCC support.
      Parameters:
      lcl - the local socket
      rem - the remote I2P socket
      pong - buffer for expected PONG responses
      log - the logger used for filtered-line and error reporting
    • IrcInboundFilter

      public IrcInboundFilter(Socket lcl, I2PSocket rem, StringBuffer pong, Log log, DCCHelper helper)
      Create an inbound filter with optional DCC support.
      Parameters:
      lcl - the local socket allowed messages are written to
      rem - the remote I2P socket lines are read from
      pong - buffer for expected PONG responses, to identify our own IRC session
      log - the logger for filtered-line and error reporting
      helper - may be null
  • Method Details

    • run

      public void run()
      Run the inbound filter loop. Reads lines from the remote I2P socket, applies inbound filtering, and writes allowed messages to the local socket.
      Specified by:
      run in interface Runnable