internal HttpListenerContext (HttpConnection connection)
 {
   _connection = connection;
   _errorStatus = 400;
   _request = new HttpListenerRequest (this);
   _response = new HttpListenerResponse (this);
 }
Example #2
0
 internal void RemoveConnection (HttpConnection connection)
 {
   lock (_connectionsSync)
     _connections.Remove (connection);
 }
Example #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);
      }
    }
Example #4
0
 internal void AddConnection (HttpConnection connection)
 {
   lock (_connectionsSync)
     _connections[connection] = connection;
 }
Example #5
0
 internal void RemoveConnection(HttpConnection connection)
 {
     lock (_unregisteredSync)
         _unregistered.Remove(connection);
 }