net.i2p.i2ptunnel.udp
Class UDPSink
java.lang.Object
net.i2p.i2ptunnel.udp.UDPSink
- All Implemented Interfaces:
- Sink
public class UDPSink
- extends Object
- implements Sink
- Author:
- welterde
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sock
protected final DatagramSocket sock
remoteHost
protected final InetAddress remoteHost
remotePort
protected final int remotePort
UDPSink
public UDPSink(InetAddress host,
int port)
- Throws:
IllegalArgumentException
- on DatagramSocket IOException
send
public void send(Destination src,
byte[] data)
- Specified by:
send
in interface Sink
- Parameters:
src
- ignored
- Throws:
RuntimeException
- on DatagramSocket IOException
getPort
public int getPort()
getSocket
public DatagramSocket getSocket()
- to pass to UDPSource constructor
stop
public void stop()