MythTV  master
Public Member Functions | Protected Attributes | List of all members
UDPPacket Class Reference

UDP Packet. More...

#include <udppacket.h>

Inheritance diagram for UDPPacket:
Inheritance graph
[legend]

Public Member Functions

 UDPPacket (const UDPPacket &)=default
 
 UDPPacket (uint64_t key)
 
 UDPPacket (void)=default
 
virtual ~UDPPacket ()=default
 
UDPPacketoperator= (const UDPPacket &)=default
 
virtual bool IsValid (void) const
 IsValid() must return true before any data access methods are called, other than GetDataReference() and GetData() More...
 
uint64_t GetKey (void) const
 
QByteArray & GetDataReference (void)
 
QByteArray GetData (void) const
 

Protected Attributes

uint64_t m_key { 0ULL }
 Key used to ensure we avoid extra memory allocation in m_data QByteArray. More...
 
QByteArray m_data
 

Detailed Description

UDP Packet.

The data is stored in a QByteArray which is a reference counted shared data container, so an UDPPacket can be assigned to a subclass efficiently.

Definition at line 20 of file udppacket.h.

Constructor & Destructor Documentation

◆ UDPPacket() [1/3]

UDPPacket::UDPPacket ( const UDPPacket )
default

◆ UDPPacket() [2/3]

UDPPacket::UDPPacket ( uint64_t  key)
inlineexplicit

Definition at line 24 of file udppacket.h.

◆ UDPPacket() [3/3]

UDPPacket::UDPPacket ( void  )
default

◆ ~UDPPacket()

virtual UDPPacket::~UDPPacket ( )
virtualdefault

Member Function Documentation

◆ operator=()

UDPPacket& UDPPacket::operator= ( const UDPPacket )
default

◆ IsValid()

virtual bool UDPPacket::IsValid ( void  ) const
inlinevirtual

IsValid() must return true before any data access methods are called, other than GetDataReference() and GetData()

Reimplemented in RTPDataPacket.

Definition at line 32 of file udppacket.h.

◆ GetKey()

uint64_t UDPPacket::GetKey ( void  ) const
inline

Definition at line 34 of file udppacket.h.

Referenced by PacketBuffer::FreePacket().

◆ GetDataReference()

QByteArray& UDPPacket::GetDataReference ( void  )
inline

◆ GetData()

QByteArray UDPPacket::GetData ( void  ) const
inline

Definition at line 37 of file udppacket.h.

Member Data Documentation

◆ m_key

uint64_t UDPPacket::m_key { 0ULL }
protected

Key used to ensure we avoid extra memory allocation in m_data QByteArray.

Definition at line 41 of file udppacket.h.

Referenced by GetKey().

◆ m_data

QByteArray UDPPacket::m_data
protected

The documentation for this class was generated from the following file: