net.i2p.router.transport.udp
Class UDPSender
java.lang.Object
net.i2p.router.transport.udp.UDPSender
public class UDPSender
- extends java.lang.Object
Lowest level packet sender, pushes anything on its queue ASAP.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDPSender
public UDPSender(RouterContext ctx,
java.net.DatagramSocket socket,
java.lang.String name)
startup
public void startup()
shutdown
public void shutdown()
updateListeningPort
public java.net.DatagramSocket updateListeningPort(java.net.DatagramSocket socket,
int newPort)
add
public int add(UDPPacket packet,
int blockTime)
- Add the packet to the queue. This may block until there is space
available, if requested, otherwise it returns immediately
- Parameters:
blockTime
- how long to block
- Returns:
- number of packets queued
add
public int add(UDPPacket packet)
- Returns:
- number of packets in the queue