Gnash  0.8.11dev
Public Member Functions | Public Attributes | List of all members
gnash::rtmp::RTMPPacket Struct Reference

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

#include <RTMP.h>

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

boost::shared_ptr<SimpleBuffer> gnash::rtmp::RTMPPacket::buffer

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 gnash::rtmp::clearPayload(), gnash::rtmp::RTMP::handlePacket(), gnash::rtmp::hasPayload(), gnash::rtmp::payloadData(), gnash::rtmp::payloadEnd(), gnash::rtmp::payloadSize(), RTMPPacket(), gnash::rtmp::sendCtrl(), and gnash::rtmp::sendServerBW().

size_t gnash::rtmp::RTMPPacket::bytesRead
RTMPHeader gnash::rtmp::RTMPPacket::header

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