Public Member Functions

hamcast::multicast_packet Class Reference

Describes a received multicast packet. More...

#include <multicast_packet.hpp>

List of all members.

Public Member Functions

 multicast_packet ()
 multicast_packet (const uri &source, boost::uint32_t size, void *buf)
const urifrom () const
const void * data () const
boost::uint32_t size () const
bool empty () const

Detailed Description

Describes a received multicast packet.

Examples:

simple_receiver.


Constructor & Destructor Documentation

hamcast::multicast_packet::multicast_packet (  ) 

Construct an empty multicast packet.

hamcast::multicast_packet::multicast_packet ( const uri source,
boost::uint32_t  size,
void *  buf 
)

Construct a new multicast packet.

Parameters:
source the source of this packet
size the size of buf
buf the data of this packet
Warning:
multicast_packet takes ownership of buf.

Member Function Documentation

const void * hamcast::multicast_packet::data (  )  const

Get the content/data of the packet.

Returns:
A pointer to the internal C-buffer.
Examples:
simple_receiver.
bool hamcast::multicast_packet::empty (  )  const

Check if this packet is empty.

Returns:
true if size() == 0; otherwise false.
const uri & hamcast::multicast_packet::from (  )  const

Get the source of this packet.

Returns:
The source group as uri object.
boost::uint32_t hamcast::multicast_packet::size (  )  const

Get the size of data().

Returns:
The size of data() in bytes.
Examples:
simple_receiver.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator