Class MultiSource

  • All Implemented Interfaces:
    Sink, Source

    public class MultiSource
    extends Object
    implements Source, Sink
    Sends to many Sinks
    Author:
    welterde, zzz modded for I2PTunnel
    • Constructor Detail

      • MultiSource

        public MultiSource()
    • Method Detail

      • setSink

        public void setSink​(Sink sink)
        Specified by:
        setSink in interface Source
      • start

        public void start()
        Specified by:
        start in interface Source
      • stop

        public void stop()
      • send

        public void send​(Destination ignored_from,
                         int ignored_fromPort,
                         int ignored_toPort,
                         byte[] data)
        May throw RuntimeException from underlying sinks
        Specified by:
        send in interface Sink
        Parameters:
        ignored_from - some implementations may ignore, may be null in some implementations
        ignored_fromPort - I2CP source port, 0-65535
        ignored_toPort - I2CP destination port, 0-65535
        Throws:
        RuntimeException
        Since:
        0.9.53 added fromPort and toPort parameters
      • add

        public void add​(MultiSource.MSink ms)
        Since:
        0.9.53 changed to MSink parameter
      • remove

        public void remove​(MultiSource.MSink ms)
        Since:
        0.9.53 changed to MSink parameter