|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.messages.Message
com.limegroup.gnutella.messages.PingRequest
A Gnutella ping message.
Field Summary |
Fields inherited from class com.limegroup.gnutella.messages.Message |
F_PING, F_PING_REPLY, F_PUSH, F_QUERY, F_QUERY_REPLY, F_ROUTE_TABLE_UPDATE, F_VENDOR_MESSAGE, F_VENDOR_MESSAGE_STABLE, N_MULTICAST, N_TCP, N_UDP, N_UNKNOWN, RECORD_STATS, SOFT_MAX |
Constructor Summary | |
|
PingRequest()
Creates a QueryKey Request ping with a new GUID and TTL of 1 |
|
PingRequest(byte ttl)
Creates a normal ping with a new GUID |
|
PingRequest(byte[] guid,
byte ttl,
byte hops)
Creates a normal ping from data read on the network |
protected |
PingRequest(byte[] guid,
byte ttl,
byte hops,
byte length)
Creates an incoming group ping. |
|
PingRequest(byte[] guid,
byte ttl,
byte hops,
byte[] payload)
Creates a big ping request from data read from the network |
protected |
PingRequest(byte ttl,
byte length)
Creates an outgoing group ping. |
Method Summary | |
boolean |
isQueryKeyRequest()
|
void |
recordDrop()
Records the dropping of this message in statistics. |
Message |
stripExtendedPayload()
Returns a message identical to this but without any extended (typically GGEP) data. |
java.lang.String |
toString()
|
protected void |
writePayload(java.io.OutputStream out)
|
Methods inherited from class com.limegroup.gnutella.messages.Message |
compareTo, getCreationTime, getFunc, getGUID, getHops, getLength, getNetwork, getPriority, getTotalLength, getTTL, hop, isMulticast, isTCP, isUDP, isUnknownNetwork, makeGuid, read, read, read, read, read, readNullTerminatedBytes, repOk, setGUID, setHops, setPriority, setTTL, updateLength, write, writeGemExtension, writeGemExtension, writeGemExtensions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PingRequest(byte[] guid, byte ttl, byte hops)
protected PingRequest(byte[] guid, byte ttl, byte hops, byte length)
public PingRequest(byte[] guid, byte ttl, byte hops, byte[] payload)
payload
- the headers etc. which the big pings contain.public PingRequest(byte ttl)
ttl
- the ttl of the new Pingprotected PingRequest(byte ttl, byte length)
length
- is length of the payload of the GroupPing =
14(port+ip+files+kbytes)+group.length + 1(null)public PingRequest()
Method Detail |
protected void writePayload(java.io.OutputStream out) throws java.io.IOException
writePayload
in class Message
java.io.IOException
public Message stripExtendedPayload()
Message
stripExtendedPayload
in class Message
public boolean isQueryKeyRequest()
public void recordDrop()
Message
recordDrop
in class Message
public java.lang.String toString()
toString
in class Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |