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

seda.sandStorm.lib.aSocket
Class AUdpPacket

java.lang.Object
  |
  +--seda.sandStorm.core.BufferElement
        |
        +--seda.sandStorm.lib.aSocket.AUdpPacket
All Implemented Interfaces:
QueueElementIF

public class AUdpPacket
extends BufferElement

An AUdpPacket is an extension to BufferElement that supports specifying the destination address and port for a given packet.

Author:
Matt Welsh

Field Summary
 java.net.InetAddress address
           
 int port
           
 
Fields inherited from class seda.sandStorm.core.BufferElement
compQ, data, offset, size, userTag
 
Constructor Summary
AUdpPacket(byte[] data)
          Create an AUdpPacket with the given data, an offset of 0, and a size of data.length.
AUdpPacket(byte[] data, int offset, int size)
          Create an AUdpPacket with the given data, offset, and size.
AUdpPacket(byte[] data, int offset, int size, SinkIF compQ)
          Create an AUdpPacket with the given data, offset, size, and completion queue.
AUdpPacket(byte[] data, int offset, int size, SinkIF compQ, java.net.InetAddress address, int port)
          Create an AUdpPacket with the given data, offset, size, completion queue, destination address, and port.
AUdpPacket(byte[] data, SinkIF compQ)
          Create an AUdpPacket with the given data, an offset of 0, and a size of data.length, with the given completion queue.
AUdpPacket(int size)
          Create an AUdpPacket with a new data array of the given size.
 
Method Summary
 java.net.InetAddress getAddress()
          Return the destination address.
 int getPort()
          Return the destination port.
 
Methods inherited from class seda.sandStorm.core.BufferElement
getBytes, getCompletionQueue, getOffset, getSize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

address

public java.net.InetAddress address

port

public int port
Constructor Detail

AUdpPacket

public AUdpPacket(byte[] data)
Create an AUdpPacket with the given data, an offset of 0, and a size of data.length.

AUdpPacket

public AUdpPacket(byte[] data,
                  SinkIF compQ)
Create an AUdpPacket with the given data, an offset of 0, and a size of data.length, with the given completion queue.

AUdpPacket

public AUdpPacket(byte[] data,
                  int offset,
                  int size)
Create an AUdpPacket with the given data, offset, and size.

AUdpPacket

public AUdpPacket(byte[] data,
                  int offset,
                  int size,
                  SinkIF compQ)
Create an AUdpPacket with the given data, offset, size, and completion queue.

AUdpPacket

public AUdpPacket(byte[] data,
                  int offset,
                  int size,
                  SinkIF compQ,
                  java.net.InetAddress address,
                  int port)
Create an AUdpPacket with the given data, offset, size, completion queue, destination address, and port.

AUdpPacket

public AUdpPacket(int size)
Create an AUdpPacket with a new data array of the given size.
Method Detail

getAddress

public java.net.InetAddress getAddress()
Return the destination address. Returns null if not set.

getPort

public int getPort()
Return the destination port. Returns -1 if not set.

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