Exemplo n.º 1
0
 internal HttpListenerContext (HttpConnection connection)
 {
   _connection = connection;
   _errorStatus = 400;
   _request = new HttpListenerRequest (this);
   _response = new HttpListenerResponse (this);
 }
Exemplo n.º 2
0
 internal void RemoveConnection (HttpConnection connection)
 {
   lock (_connectionsSync)
     _connections.Remove (connection);
 }
Exemplo n.º 3
0
    private void cleanupConnections ()
    {
      lock (_connectionsSync) {
        if (_connections.Count == 0)
          return;

        // Need to copy this since closing will call RemoveConnection.
        var keys = _connections.Keys;
        var conns = new HttpConnection[keys.Count];
        keys.CopyTo (conns, 0);
        _connections.Clear ();
        for (var i = conns.Length - 1; i >= 0; i--)
          conns[i].Close (true);
      }
    }
Exemplo n.º 4
0
 internal void AddConnection (HttpConnection connection)
 {
   lock (_connectionsSync)
     _connections[connection] = connection;
 }
Exemplo n.º 5
0
 internal void RemoveConnection(HttpConnection connection)
 {
     lock (_unregisteredSync)
         _unregistered.Remove(connection);
 }