Holds a single RTMP chunk, either send or receive direction.  
 More...
#include <rtmpchunks.h>
Holds a single RTMP chunk, either send or receive direction. 
      
        
          | RTMPStream::Chunk::Chunk | ( |  | ) |  | 
      
 
Default constructor, creates an empty chunk with all values initialized to zero. 
 
 
      
        
          | RTMPStream::Chunk::Chunk | ( |  | ) |  | 
      
 
 
      
        
          | std::string & RTMPStream::Chunk::Pack | ( |  | ) |  | 
      
 
Packs up the chunk for sending over the network. 
- Warning
- Do not call if you are not actually sending the resulting data! 
- Returns
- A std::string ready to be sent. 
 
 
      
        
          | std::string& RTMPStream::Chunk::Pack | ( |  | ) |  | 
      
 
 
Parses the argument Socket::Buffer into the current chunk. 
Tries to read a whole chunk, removing data from the Buffer as it reads. If a single packet contains a partial chunk, it will remove the packet and call itself again. This has the effect of only causing a "true" reponse in the case a whole chunk is read, not just part of a chunk. 
- Parameters
- 
  
    | buffer | The input to parse and update. |  
 
- Warning
- This function will destroy the current data in this chunk! 
- Returns
- True if a whole chunk could be read, false otherwise. 
 
 
      
        
          | unsigned int RTMPStream::Chunk::cs_id | 
      
 
 
      
        
          | std::string RTMPStream::Chunk::data | 
      
 
 
      
        
          | unsigned char RTMPStream::Chunk::headertype | 
      
 
For input chunks, the type of header. This is calculated automatically for output chunks. 
 
 
      
        
          | unsigned int RTMPStream::Chunk::len | 
      
 
Length of the complete chunk. 
 
 
      
        
          | unsigned int RTMPStream::Chunk::len_left | 
      
 
Length not yet received, out of complete chunk. 
 
 
      
        
          | unsigned int RTMPStream::Chunk::msg_stream_id | 
      
 
 
      
        
          | unsigned char RTMPStream::Chunk::msg_type_id | 
      
 
 
      
        
          | unsigned int RTMPStream::Chunk::real_len | 
      
 
Length of this particular part of it. 
 
 
      
        
          | unsigned int RTMPStream::Chunk::timestamp | 
      
 
 
      
        
          | unsigned int RTMPStream::Chunk::ts_delta | 
      
 
 
      
        
          | unsigned int RTMPStream::Chunk::ts_header | 
      
 
Last header timestamp without extensions or deltas. 
 
 
The documentation for this class was generated from the following files: