com.limegroup.gnutella.messages.vendor
Class ReplyNumberVendorMessage
java.lang.Object
com.limegroup.gnutella.messages.Message
com.limegroup.gnutella.messages.vendor.VendorMessage
com.limegroup.gnutella.messages.vendor.ReplyNumberVendorMessage
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public final class ReplyNumberVendorMessage
- extends VendorMessage
In Vendor Message parlance, the "message type" of this VMP is "LIME/12".
This message contains a unsigned byte (1-255) that tells you how many
results the sending host has for the guid of a query (the guid of this
message is the same as the original query). The recieving host can ACK
this message with a LimeACKVendorMessage to actually recieve the replies.
- See Also:
- Serialized Form
Fields inherited from class com.limegroup.gnutella.messages.vendor.VendorMessage |
F_BEAR_VENDOR_ID, F_GTKG_VENDOR_ID, F_HOPS_FLOW, F_LIME_ACK, F_LIME_VENDOR_ID, F_MESSAGES_SUPPORTED, F_NULL_VENDOR_ID, F_PUSH_PROXY_ACK, F_PUSH_PROXY_REQ, F_REPLY_NUMBER, F_TCP_CONNECT_BACK, F_UDP_CONNECT_BACK |
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 |
Method Summary |
boolean |
equals(java.lang.Object other)
|
int |
getNumResults()
|
void |
recordDrop()
Overridden purely for stats handling. |
protected void |
writePayload(java.io.OutputStream out)
Overridden purely for stats handling. |
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, toString, updateLength, write, writeGemExtension, writeGemExtension, writeGemExtensions |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
ReplyNumberVendorMessage
public ReplyNumberVendorMessage(GUID replyGUID,
int numResults)
throws BadPacketException
- Parameters:
numResults
- The number of results (1-255 inclusive) that you have
for this query. If you have more than 255 just send 255.replyGUID
- The guid of the original query/reply that you want to
send reply info for.
getNumResults
public int getNumResults()
- Returns:
- an int (1-255) representing the amount of results that a host
for a given query (as specified by the guid of this message).
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class VendorMessage
- Returns:
- true if the two VMPs have identical signatures - no more, no
less. Does not take version into account, but if different versions
have different payloads, they'll differ.
writePayload
protected void writePayload(java.io.OutputStream out)
throws java.io.IOException
- Overridden purely for stats handling.
- Overrides:
writePayload
in class VendorMessage
- Throws:
java.io.IOException
recordDrop
public void recordDrop()
- Overridden purely for stats handling.
- Overrides:
recordDrop
in class VendorMessage