Package net.i2p.i2ptunnel.udp
Class UDPSink
- java.lang.Object
-
- net.i2p.i2ptunnel.udp.UDPSink
-
-
Field Summary
Fields Modifier and Type Field Description protected InetAddressremoteHostprotected intremotePortprotected DatagramSocketsock
-
Constructor Summary
Constructors Constructor Description UDPSink(InetAddress host, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPort()DatagramSocketgetSocket()to pass to UDPSource constructorvoidsend(Destination src, byte[] data)voidstop()
-
-
-
Field Detail
-
sock
protected final DatagramSocket sock
-
remoteHost
protected final InetAddress remoteHost
-
remotePort
protected final int remotePort
-
-
Constructor Detail
-
UDPSink
public UDPSink(InetAddress host, int port)
- Throws:
IllegalArgumentException- on DatagramSocket IOException
-
-
Method Detail
-
send
public void send(Destination src, byte[] data)
- Specified by:
sendin interfaceSink- 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()
-
-