Exemplo 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);
            }
        }
Exemplo n.º 2
0
 public virtual void HandlePostRequest(SimpleHttpProcessor processor, StreamReader inputData)
 {
 }
Exemplo n.º 3
0
 public virtual void HandleGetRequest(SimpleHttpProcessor processor)
 {
 }