/*----------------------------------------------------------------------
|    PLT_SsdpListenTask::SetupResponse
+---------------------------------------------------------------------*/
NPT_Result 
PLT_SsdpListenTask::SetupResponse(NPT_HttpRequest&              request, 
                                  const NPT_HttpRequestContext& context,
                                  NPT_HttpResponse&             response) 
{
    NPT_COMPILER_UNUSED(response);

    NPT_AutoLock lock(m_Mutex);
    m_Listeners.Apply(PLT_SsdpPacketListenerIterator(request, context));

    // return error since we don't have anything to respond
    // as we use a separate task to respond with ssdp
    return NPT_ERROR_TERMINATED;
}
Exemple #2
0
/*----------------------------------------------------------------------
|    PLT_SsdpListenTask::ProcessRequest
+---------------------------------------------------------------------*/
NPT_Result 
PLT_SsdpListenTask::ProcessRequest(NPT_HttpRequest&              request, 
                                   const NPT_HttpRequestContext& context,
                                   NPT_HttpResponse*&            response,
                                   bool&                         headers_only) 
{
    NPT_COMPILER_UNUSED(headers_only);

    NPT_AutoLock lock(m_Mutex);
    m_Listeners.Apply(PLT_SsdpPacketListenerIterator(request, context));

    // set response to NULL since we don't have anything to respond
    // as we use a separate task to respond with ssdp
    response = NULL;
    return NPT_SUCCESS;
}