| java.lang.Object seda.sandStorm.lib.Gnutella.GnutellaPacket seda.sandStorm.lib.Gnutella.GnutellaPongPacket
GnutellaPongPacket | public class GnutellaPongPacket extends GnutellaPacket (Code) | | A Gnutella network pong packet.
|
Constructor Summary | |
public | GnutellaPongPacket(byte[] payload) Create a pong packet with the given payload. | public | GnutellaPongPacket(GnutellaGUID guid, int ttl, int hops, byte[] payload) Create a pong packet with the given GUID, TTL, hops, and payload. | public | GnutellaPongPacket(GnutellaGUID guid, int numfiles, int numkb) Create a pong packet with the given numfiles and numkb, with the
default port and local host address. | public | GnutellaPongPacket(GnutellaGUID guid, int port, InetAddress address, int numfiles, int numkb) Create a pong packet with the given port, address, numfiles and numkb. |
Method Summary | |
public String | getHost() Return a string "host:port" represented by this packet. | public InetAddress | getInetAddress() Return the address represented by this packet. | public int | getNumFiles() Return the number of files shared by the machine from which this
packet originated. | public int | getNumKB() Return the number of kilobytes of files shared by the machine from
which this packet originated. | public int | getPort() Return the port represented by this packet. | protected void | prepareForSend() | public String | toString() |
GnutellaPongPacket | public GnutellaPongPacket(byte[] payload) throws UnknownHostException(Code) | | Create a pong packet with the given payload.
|
GnutellaPongPacket | public GnutellaPongPacket(GnutellaGUID guid, int ttl, int hops, byte[] payload) throws UnknownHostException(Code) | | Create a pong packet with the given GUID, TTL, hops, and payload.
|
GnutellaPongPacket | public GnutellaPongPacket(GnutellaGUID guid, int numfiles, int numkb) throws UnknownHostException(Code) | | Create a pong packet with the given numfiles and numkb, with the
default port and local host address.
|
getHost | public String getHost()(Code) | | Return a string "host:port" represented by this packet.
|
getInetAddress | public InetAddress getInetAddress()(Code) | | Return the address represented by this packet.
|
getNumFiles | public int getNumFiles()(Code) | | Return the number of files shared by the machine from which this
packet originated.
|
getNumKB | public int getNumKB()(Code) | | Return the number of kilobytes of files shared by the machine from
which this packet originated.
|
getPort | public int getPort()(Code) | | Return the port represented by this packet.
|
prepareForSend | protected void prepareForSend()(Code) | | |
|
|