simnet
Class DatagramPacket

java.lang.Object
  extended bysimnet.DatagramPacket

public class DatagramPacket
extends java.lang.Object

An read-only object encapsulating a UDP message data and sender information.


Field Summary
protected  int cached_size
           
 java.lang.Object data
          The data this packet contains
 int ip
          The ip address this packet was sent from
 int port
          The port this packet was sent from
 
Constructor Summary
DatagramPacket(java.lang.Object data, int ip, int port)
          Simple constructor.
 
Method Summary
 int getSize()
          Get the size of the data for this object - the overhead of this packet is not included
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

public final java.lang.Object data
The data this packet contains


ip

public final int ip
The ip address this packet was sent from


port

public final int port
The port this packet was sent from


cached_size

protected int cached_size
Constructor Detail

DatagramPacket

public DatagramPacket(java.lang.Object data,
                      int ip,
                      int port)
Simple constructor.

Method Detail

toString

public java.lang.String toString()

getSize

public int getSize()
Get the size of the data for this object - the overhead of this packet is not included