66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sarand.OperationsMgr.Service.Handlers
|
|
{
|
|
//=======================================================================
|
|
// Ref. http://stackoverflow.com/questions/5895063/asynchronous-httplistener-problem-each-request-is-received-twice
|
|
//=======================================================================
|
|
public class HttpListenerCallbackState
|
|
{
|
|
public HttpListenerCallbackState (HttpListener listener)
|
|
{
|
|
}
|
|
}
|
|
//=======================================================================
|
|
public class OpnHttpRequestHandler
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
|
|
//-------------------------------------------------------------------
|
|
// Configure the listener.
|
|
|
|
//-------------------------------------------------------------------
|
|
// Start the listener.
|
|
public void ListenAsynchronously ()
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Stop the listener.
|
|
public void StopListening ()
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
private void Listen (object state)
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// L i s t e n e r E v e n t s
|
|
//-------------------------------------------------------------------
|
|
private void ListenerCallback (IAsyncResult ar)
|
|
{
|
|
}
|
|
private void HandleHttpRequest (HttpListenerContext context, long requestNumber)
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>Intercept requests for static resources and respond with 'Not Found'.</summary>
|
|
private bool IsStaticResourceUnavailable (HttpListenerRequest request)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|