net.i2p.i2ptunnel.streamr

## Class Subscriber

- java.lang.Object
- - net.i2p.i2ptunnel.streamr.Subscriber

- All Implemented Interfaces:
    Sink

      public class Subscriber
      extends Object
      implements Sink

  Server-mode subscriber that manages multiple data sources and handles incoming connections

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Subscriber(MultiSource multi)` Creates a new subscriber for managing data source connections.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `send(Destination dest, int fromPort, int toPort, byte[] data)` Doesn't really "send" anywhere, just subscribes or unsubscribes the destination

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Subscriber

          public Subscriber(MultiSource multi)

      Creates a new subscriber for managing data source connections.
      Parameters:
        `multi` - the multi-source to register subscriptions with

  - ### Method Detail

    - #### send

          public void send(Destination dest,
                           int fromPort,
                           int toPort,
                           byte[] data)

      Doesn't really "send" anywhere, just subscribes or unsubscribes the destination
      Specified by:
        `send` in interface `Sink`
      Parameters:
        `dest` - to subscribe or unsubscribe
        `data` - must be a single byte, 0 to subscribe, 1 to unsubscribe
        `fromPort` - I2CP source port, 0-65535
        `toPort` - I2CP destination port, 0-65535