Пример #1
0
        private void HandleClose(RtmptRequest request)
        {
            RtmptConnection connection = GetConnection(request);

            if (connection == null)
            {
                HandleBadRequest(__Res.GetString(__Res.Rtmpt_UnknownClient, request.Url), request);
                return;
            }
            FluorineRtmpContext.Initialize(connection);
            RemoveConnection(connection.ConnectionId);
            _rtmpHandler.ConnectionClosed(connection);
            ReturnMessage(0, request);
            connection.RealClose();
        }
Пример #2
0
        private void HandleIdle(RtmptRequest request)
        {
            RtmptConnection connection = GetConnection(request);

            if (connection == null)
            {
                HandleBadRequest(__Res.GetString(__Res.Rtmpt_UnknownClient, request.Url), request);
                return;
            }
            if (connection.IsClosing)
            {
                // Tell client to close the connection
                ReturnMessage(0, request);
                connection.RealClose();
                return;
            }
            FluorineRtmpContext.Initialize(connection);
            ReturnPendingMessages(connection, request);
        }