rtpi.packets
Class RtcpiByePacket

java.lang.Object
  |
  +--rtpi.packets.RtcpiPacket
        |
        +--rtpi.packets.RtcpiByePacket

public class RtcpiByePacket
extends RtcpiPacket

This implements the RTCP/I bye packet.


Field Summary
static int BYE
          The payload type for bye packets.
 
Fields inherited from class rtpi.packets.RtcpiPacket
count, HEADER_SIZE, length, packetData, packetStart, participantID, payloadType, reserved, version, VERSION
 
Constructor Summary
RtcpiByePacket(byte[] d, int s)
          This creates an RTCP/I bye packet from a transport packet that has been received.
RtcpiByePacket(int pid)
          This creates a new bye packet that is to be transmitted over the network.
RtcpiByePacket(int pid, byte[] r)
          This creates a new bye packet that is to be transmitted over the network.
 
Method Summary
 void flush()
          This flushes an outgoing packet.
 byte[] getReason()
          This returns the reason for transmitting the bye packet.
 void parse()
          This parses an incoming packet.
 java.lang.String toString()
          Convert this object to a string.
 
Methods inherited from class rtpi.packets.RtcpiPacket
flushHeader, getLength, getPacket, getParticipantID, getPayloadType, inspectLength, inspectPayloadType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BYE

public static final int BYE
The payload type for bye packets.
Constructor Detail

RtcpiByePacket

public RtcpiByePacket(int pid)
This creates a new bye packet that is to be transmitted over the network.
Parameters:
pid - The id of the participant transmitting the packet.

RtcpiByePacket

public RtcpiByePacket(int pid,
                      byte[] r)
This creates a new bye packet that is to be transmitted over the network.
Parameters:
pid - The id of the participant transmitting the packet.
r - The reason for leaving the session.

RtcpiByePacket

public RtcpiByePacket(byte[] d,
                      int s)
This creates an RTCP/I bye packet from a transport packet that has been received.
Parameters:
d - The transport packet.
s - The start of the RTCP/I packet in the transport packet (position of the first byte of the RTCP/I header.
Method Detail

flush

public void flush()
           throws RtpiFlushException
This flushes an outgoing packet.
Overrides:
flush in class RtcpiPacket

parse

public void parse()
           throws RtpiParseException
This parses an incoming packet.
Overrides:
parse in class RtcpiPacket

getReason

public byte[] getReason()
This returns the reason for transmitting the bye packet.
Returns:
The reason for transmitting the bye packet.

toString

public java.lang.String toString()
Convert this object to a string.
Returns:
This object as a string.
Overrides:
toString in class RtcpiPacket