Next: , Up: ccRTP Overview

3.1 Simple Transmitter

The following snippet illustrates the required steps to send an application data unit over RTP.

     RTPSession s(InetHostAddress(""),8000);  // bind reception socket
     // Initialization
     cout << "Local SSRC identifier: " << s.getLocalSSRC() << endl;
     s.addDestination("",9000); // set one destination for packets
     s.startRunning(); // start running the packet queue scheduler
     // Send data
     s.putData(0,buffer,bufferLen); // buffer holds bufferLen payload octets