Example #1
0
        private void ReturnPendingMessages(RtmptConnection connection, RtmptRequest request)
        {
            ByteBuffer data = connection.GetPendingMessages(RtmptConnection.RESPONSE_TARGET_SIZE);

            if (data == null)
            {
                // no more messages to send...
                if (connection.IsClosing)
                {
                    // Tell client to close connection
                    ReturnMessage(0, request);
                }
                else
                {
                    ReturnMessage(connection.PollingDelay, request);
                }
                return;
            }
            ReturnMessage(connection, data, request);
        }
Example #2
0
        private void ReturnPendingMessages(RtmptConnection connection, HttpResponse response)
        {
            ByteBuffer pendingMessages = connection.GetPendingMessages(RESPONSE_TARGET_SIZE);

            if (pendingMessages == null)
            {
                if (connection.IsClosing)
                {
                    this.ReturnMessage((byte)0, response);
                }
                else
                {
                    this.ReturnMessage(connection.PollingDelay, response);
                }
            }
            else
            {
                this.ReturnMessage(connection, pendingMessages, response);
            }
        }
 private void ReturnPendingMessages(RtmptConnection connection, RtmptRequest request)
 {
     ByteBuffer data = connection.GetPendingMessages(RtmptConnection.RESPONSE_TARGET_SIZE);
     if (data == null)
     {
         // no more messages to send...
         if (connection.IsClosing)
         {
             // Tell client to close connection
             ReturnMessage(0, request);
         }
         else
             ReturnMessage(connection.PollingDelay, request);
         return;
     }
     ReturnMessage(connection, data, request);
 }