Package net.i2p.router.transport.udp
Class UDPSender
java.lang.Object
net.i2p.router.transport.udp.UDPSender
class UDPSender extends Object
Lowest level packet sender, pushes anything on its queue ASAP.
There is a UDPSender for each UDPEndpoint.
It contains a thread and a queue. Packet to be sent are queued
by the PacketPusher.
-
Constructor Summary
Constructors Constructor Description UDPSender(RouterContext ctx, DatagramSocket socket, String name, SocketListener lsnr)
-
Method Summary
Modifier and Type Method Description void
add(UDPPacket packet)
Put it on the queue.void
add(UDPPacket packet, int blockTime)
Deprecated.use add(packet)void
clear()
Clear outbound queue, probably in preparation for sending destroy() to everybody.boolean
fullStats()
void
shutdown()
void
startup()
Cannot be restarted (socket is final)
-
Constructor Details
-
Method Details
-
fullStats
public boolean fullStats() -
startup
public void startup()Cannot be restarted (socket is final) -
shutdown
public void shutdown() -
clear
public void clear()Clear outbound queue, probably in preparation for sending destroy() to everybody.- Since:
- 0.9.2
-
add
Deprecated.use add(packet)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 IGNORED
-
add
Put it on the queue. BLOCKING if queue is full (backs up PacketPusher thread)
-