java.lang.Object
net.i2p.client.streaming.impl.ConnectionManager.PingRequest
- Enclosing class:
ConnectionManager
Holds the state for a pending ping request, including optional payload and notification callback.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectionManager.PingNotifierNotified when the pong arrives.private ByteArrayThe payload echoed back by the pong.private booleanWhether the pong has arrived.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionPayload received in the pong.voidRecord the pong and notify the caller.booleanWhether a pong has been received.
Field Details
_ponged
private boolean _pongedWhether the pong has arrived._payload
The payload echoed back by the pong._notifier
Notified when the pong arrives.
Constructor Details
PingRequest
Ping request.- Parameters:
notifier- may be null
Method Details
pong
Record the pong and notify the caller.- Parameters:
payload- may be null
pongReceived
public boolean pongReceived()Whether a pong has been received.- Returns:
- true when the pong arrived
getPayload
Payload received in the pong.- Returns:
- null if no payload or no pong received