Exemple #1
0
void Connector_RTMP::sendCommand(AMF::Object & amfreply, int messagetype, int stream_id){
  #if DEBUG >= 4
  std::cerr << amfreply.Print() << std::endl;
  #endif
  if (messagetype == 17){
    Socket.SendNow(RTMPStream::SendChunk(3, messagetype, stream_id, (char)0+amfreply.Pack()));
  }else{
    Socket.SendNow(RTMPStream::SendChunk(3, messagetype, stream_id, amfreply.Pack()));
  }
}//sendCommand
Exemple #2
0
 ///\brief Sends a RTMP command either in AMF or AMF3 mode.
 ///\param amfReply The data to be sent over RTMP.
 ///\param messageType The type of message.
 ///\param streamId The ID of the AMF stream.
 void sendCommand(AMF::Object & amfReply, int messageType, int streamId){
 #if DEBUG >= 8
   std::cerr << amfReply.Print() << std::endl;
 #endif
   if (messageType == 17){
     Socket.SendNow(RTMPStream::SendChunk(3, messageType, streamId, (char)0 + amfReply.Pack()));
   }else{
     Socket.SendNow(RTMPStream::SendChunk(3, messageType, streamId, amfReply.Pack()));
   }
 } //sendCommand