Ejemplo n.º 1
0
        private void Handler(object param)
        {
            var client = (Socket)param;

            lock (Clients)
            {
                Clients.Add(client);
            }

            var processor = new SimpleHttpProcessor(client, this);

            processor.Process();

            try
            {
                client.Shutdown(SocketShutdown.Both);
                client.Disconnect(false);
            }
            catch (SocketException)
            {
            }
            catch (ObjectDisposedException)
            {
            }
            catch (PlatformNotSupportedException)
            {
            }

            lock (Clients)
            {
                Clients.Remove(client);
            }
        }
Ejemplo n.º 2
0
 public virtual void HandlePostRequest(SimpleHttpProcessor processor, StreamReader inputData)
 {
 }
Ejemplo n.º 3
0
 public virtual void HandleGetRequest(SimpleHttpProcessor processor)
 {
 }