Gnash  0.8.10
Public Member Functions | Public Attributes
gnash::rtmp::RTMPPacket Struct Reference

An RTMPPacket class contains a full description of an RTMP packet. More...

#include <RTMP.h>

List of all members.

Public Member Functions

 RTMPPacket (size_t reserve=0)
 Construct a packet with an optional reserved memory allocation.
 RTMPPacket (const RTMPPacket &other)
 Copy constructor.
 ~RTMPPacket ()

Public Attributes

RTMPHeader header
boost::shared_ptr< SimpleBufferbuffer
 A buffer with enough storage to write the entire message.
size_t bytesRead

Detailed Description

An RTMPPacket class contains a full description of an RTMP packet.

This comprises: header information an AMF payload. An RTMPPacket may be copied without a large penalty. This is to allow storage in the RTMP client's channels.


Constructor & Destructor Documentation

gnash::rtmp::RTMPPacket::RTMPPacket ( size_t  reserve = 0) [explicit]

Construct a packet with an optional reserved memory allocation.

Parameters:
reserveThe amount of space in bytes to reserve for the message body. This can save reallocations when appending AMF data. Space for the header is always reserved and is not affected by this parameter.

References buffer, and gnash::rtmp::RTMPHeader::headerSize.

gnash::rtmp::RTMPPacket::RTMPPacket ( const RTMPPacket other)

Copy constructor.

Creates an identical RTMPPacket with shared ownership of the buffer.

gnash::rtmp::RTMPPacket::~RTMPPacket ( ) [inline]

Member Data Documentation

A buffer with enough storage to write the entire message.

This always includes at least the header. Storage for the message payload is added as necessary.

Referenced by RTMPPacket(), gnash::rtmp::RTMP::handlePacket(), gnash::rtmp::sendServerBW(), gnash::rtmp::sendCtrl(), gnash::rtmp::hasPayload(), gnash::rtmp::clearPayload(), gnash::rtmp::payloadSize(), gnash::rtmp::payloadData(), and gnash::rtmp::payloadEnd().


The documentation for this struct was generated from the following files: