More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.lib.Gnutella
Class GnutellaQueryHitsPacket

java.lang.Object
  |
  +--seda.sandStorm.lib.Gnutella.GnutellaPacket
        |
        +--seda.sandStorm.lib.Gnutella.GnutellaQueryHitsPacket
All Implemented Interfaces:
GnutellaConst, QueueElementIF

public class GnutellaQueryHitsPacket
extends GnutellaPacket

A Gnutella query hits packet.


Field Summary
(package private)  java.net.InetAddress address
           
(package private)  int port
           
(package private)  int speed
           
 
Fields inherited from class seda.sandStorm.lib.Gnutella.GnutellaPacket
function, gc, guid, hops, NUM_ALLOC, payload, payload_length, ttl
 
Fields inherited from interface seda.sandStorm.lib.Gnutella.GnutellaConst
DEFAULT_DOWNLOAD_PORT, DEFAULT_GNUTELLA_PORT, DEFAULT_HOPS, DEFAULT_PING_INTERVAL, DEFAULT_SPEED, DEFAULT_TTL, GNUTELLA_CONNECT, GNUTELLA_FN_PING, GNUTELLA_FN_PONG, GNUTELLA_FN_PUSH, GNUTELLA_FN_QUERY, GNUTELLA_FN_QUERYHITS, GNUTELLA_OK, MAX_PAYLOAD_SIZE, PACKET_HEADER_SIZE, WRITE_CLOG_THRESHOLD
 
Constructor Summary
GnutellaQueryHitsPacket(byte[] payload)
          Create a GnutellaQueryHitsPacket from the given payload.
GnutellaQueryHitsPacket(GnutellaGUID guid, int ttl, int hops, byte[] payload)
          Create a GnutellaQueryHitsPacket from the given payload with the given GUID, ttl, and hops.
GnutellaQueryHitsPacket(GnutellaQueryHit[] hits)
          Create a GnutellaQueryHitsPacket from the given GnutellaQueryHit array.
GnutellaQueryHitsPacket(int index, int size, java.lang.String filename)
          Create a GnutellaQueryHitsPacket with a single hit with the given index, size, and filename.
 
Method Summary
(package private) static void ()
           
protected  void prepareForSend()
          Implemented by subclasses to prepare for sending
 java.lang.String toString()
           
 
Methods inherited from class seda.sandStorm.lib.Gnutella.GnutellaPacket
finalize, getBuffer, getConnection, getGUID, getSize, readLEInt, readLEShort, setConnection, writeLEInt, writeLEShort
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

port

int port

address

java.net.InetAddress address

speed

int speed
Constructor Detail

GnutellaQueryHitsPacket

public GnutellaQueryHitsPacket(byte[] payload)
                        throws java.net.UnknownHostException
Create a GnutellaQueryHitsPacket from the given payload.

GnutellaQueryHitsPacket

public GnutellaQueryHitsPacket(GnutellaGUID guid,
                               int ttl,
                               int hops,
                               byte[] payload)
                        throws java.net.UnknownHostException
Create a GnutellaQueryHitsPacket from the given payload with the given GUID, ttl, and hops.

GnutellaQueryHitsPacket

public GnutellaQueryHitsPacket(GnutellaQueryHit[] hits)
Create a GnutellaQueryHitsPacket from the given GnutellaQueryHit array.

GnutellaQueryHitsPacket

public GnutellaQueryHitsPacket(int index,
                               int size,
                               java.lang.String filename)
Create a GnutellaQueryHitsPacket with a single hit with the given index, size, and filename.
Method Detail

static void ()

prepareForSend

protected void prepareForSend()
Description copied from class: GnutellaPacket
Implemented by subclasses to prepare for sending
Overrides:
prepareForSend in class GnutellaPacket

toString

public java.lang.String toString()
Overrides:
toString in class GnutellaPacket

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/