All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class AcmeNet.Util.ArrivingPacket

AcmeNet.Util.ArrivingPacket

public class ArrivingPacket
A data packet that has arrived at this machine via the network.


Constructor Index

 o ArrivingPacket(NetAddress, byte[], int)

Method Index

 o getData()
 o getLength()
 o getSender()

Constructors

 o ArrivingPacket
 public ArrivingPacket(NetAddress s,
                       byte d[],
                       int len)
Parameters:
s - the location of the packet's sender
d - array containing the packet's data
len - number of bytes of valid data in the packet

Methods

 o getSender
 NetAddress getSender()
Returns:
the location of the packet's sender
 o getData
 byte[] getData()
Returns:
an array containing the packet data (only the first getLength() bytes are valid)
 o getLength
 int getLength()
Returns:
the number of bytes of valid data in the packet

All Packages  Class Hierarchy  This Package  Previous  Next  Index