Class UDPSource

java.lang.Object
net.i2p.i2ptunnel.udp.UDPSource
All Implemented Interfaces:
Runnable, Source

public class UDPSource extends Object implements Source, Runnable
Author:
welterde
  • Field Details

  • Constructor Details

    • UDPSource

      public UDPSource(int port)
      Throws:
      RuntimeException - on DatagramSocket IOException
    • UDPSource

      public UDPSource(DatagramSocket sock)
      use socket from UDPSink
  • Method Details

    • setSink

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

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

      public void run()
      Specified by:
      run in interface Runnable
    • getPort

      public int getPort()
      Returns:
      the local port of the DatagramSocket we are receiving on
      Since:
      0.9.53
    • stop

      public void stop()