java.lang.Object
net.i2p.i2ptunnel.streamr.Pinger
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intUDP port the pings are sent from.private final LogLogger for this class.protected booleanTrue while the ping loop should keep running.protected SinkThe destination that carries the ping messages.protected final ThreadThe thread running the ping loop.private final ObjectHeld while waiting for the next ping.Constructor Summary
ConstructorsConstructorDescriptionPinger(I2PAppContext ctx, int fromPort) Creates a pinger for the given I2CP from port.Method Summary
Field Details
sink
The destination that carries the ping messages.thread
The thread running the ping loop.waitlock
Held while waiting for the next ping.running
protected volatile boolean runningTrue while the ping loop should keep running.log
Logger for this class.fromPort
private final int fromPortUDP port the pings are sent from.
Constructor Details
Pinger
Creates a pinger for the given I2CP from port.- Parameters:
ctx- the application context supplying the router log managerfromPort- the I2CP from port
Method Details
setSink
start
stop
public void stop()Stops the pinger thread and sends an unsubscribe message.run