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

public class IrcOutboundFilterextends Object implements Runnable
Thread to do outbound 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

    • IrcOutboundFilter

      public IrcOutboundFilter(Socket lcl, I2PSocket rem, StringBuffer pong, Log log)
      Create an outbound filter without DCC support.
      Parameters:
      lcl - the local socket
      rem - the remote I2P socket
      pong - buffer for expected PONG responses
      log - logger used for filter messages
    • IrcOutboundFilter

      public IrcOutboundFilter(Socket lcl, I2PSocket rem, StringBuffer pong, Log log, DCCHelper helper)
      Create an outbound filter with optional DCC support.
      Parameters:
      lcl - the local socket
      rem - the remote I2P socket
      pong - buffer for expected PONG responses
      log - logger used for filter messages
      helper - may be null
  • Method Details

    • run

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