Package net.i2p.i2ptunnel.udp
Class UDPSink
java.lang.Object
net.i2p.i2ptunnel.udp.UDPSink
- All Implemented Interfaces:
 Sink
- Author:
 - welterde
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final InetAddressprotected final intprotected final DatagramSocket - 
Constructor Summary
ConstructorsConstructorDescriptionUDPSink(DatagramSocket socket, InetAddress host, int port) UDPSink(InetAddress host, int port)  - 
Method Summary
Modifier and TypeMethodDescriptionintgetPort()to pass to UDPSource constructorvoidsend(Destination src, int fromPort, int toPort, byte[] data) voidstop() 
- 
Field Details
- 
sock
 - 
remoteHost
 - 
remotePort
protected final int remotePort 
 - 
 - 
Constructor Details
- 
UDPSink
- Parameters:
 host- where to sendport- where to send- Throws:
 IllegalArgumentException- on DatagramSocket IOException
 - 
UDPSink
- Parameters:
 socket- existing sockethost- where to sendport- where to send- Since:
 - 0.9.53
 
 
 - 
 - 
Method Details
- 
send
- Specified by:
 sendin interfaceSink- Parameters:
 src- ignoredfromPort- ignoredtoPort- ignored- Throws:
 RuntimeException- on DatagramSocket IOException- Since:
 - 0.9.53 added fromPort and toPort parameters, breaking change, sorry
 
 - 
getPort
public int getPort()- Returns:
 - the local port of the DatagramSocket we are sending from
 
 - 
getSocket
to pass to UDPSource constructor - 
stop
public void stop() 
 -