internal HttpListenerContext(HttpConnection connection)
 {
     _connection = connection;
     _errorStatus = 400;
     _request = new HttpListenerRequest (this);
     _response = new HttpListenerResponse (this);
 }
 internal HttpListenerContext(HttpConnection cnc)
 {
     this.cnc   = cnc;
     err_status = 400;
     request    = new HttpListenerRequest (this);
     response   = new HttpListenerResponse (this);
 }
Esempio n. 3
0
 internal void RemoveConnection (HttpConnection connection)
 {
   lock (_connectionsSync)
     _connections.Remove (connection);
 }
Esempio n. 4
0
 internal void AddConnection (HttpConnection connection)
 {
   lock (_connectionsSync)
     _connections[connection] = connection;
 }
Esempio n. 5
0
    private void cleanupConnections ()
    {
      lock (_connectionsSync) {
        if (_connections.Count == 0)
          return;

        // Need to copy this since closing will call the RemoveConnection method.
        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);
      }
    }
        internal bool AddConnection(HttpConnection connection)
        {
            if (!_listening)
            return false;

              lock (_connectionsSync) {
            if (!_listening)
              return false;

            _connections[connection] = connection;
            return true;
              }
        }
Esempio n. 7
0
 internal void AddConnection(HttpConnection connection)
 {
     lock (_connectionsSync)
         _connections[connection] = connection;
 }
Esempio n. 8
0
        void CleanupConnections()
        {
            lock (((ICollection)connections).SyncRoot) {
                if (connections.Count == 0)
                    return;

                // Need to copy this since closing will call RemoveConnection
                ICollection keys = connections.Keys;
                var conns = new HttpConnection [keys.Count];
                keys.CopyTo (conns, 0);
                connections.Clear ();
                for (int i = conns.Length - 1; i >= 0; i--)
                    conns [i].Close (true);
            }
        }
Esempio n. 9
0
 internal void RemoveConnection (HttpConnection connection)
 {
   lock (((ICollection) _connections).SyncRoot)
     _connections.Remove (connection);
 }
Esempio n. 10
0
 internal void AddConnection (HttpConnection connection)
 {
   lock (((ICollection) _connections).SyncRoot)
     _connections [connection] = connection;
 }
Esempio n. 11
0
        static void OnRead(IAsyncResult ares)
        {
            HttpConnection cnc = (HttpConnection)ares.AsyncState;

            cnc.OnReadInternal(ares);
        }
Esempio n. 12
0
 internal void RemoveConnection(HttpConnection cnc)
 {
     connections.Remove(cnc);
 }
Esempio n. 13
0
 internal void AddConnection(HttpConnection cnc)
 {
     connections [cnc] = cnc;
 }
Esempio n. 14
0
 internal void RemoveConnection(HttpConnection connection)
 {
     lock (_connectionsSync)
         _connections.Remove(connection);
 }
Esempio n. 15
0
 internal void AddConnection(HttpConnection cnc)
 {
     connections [cnc] = cnc;
 }
Esempio n. 16
0
 internal void RemoveConnection(HttpConnection cnc)
 {
     connections.Remove (cnc);
 }
Esempio n. 17
0
 internal void AddConnection (HttpConnection connection)
 {
   _connections [connection] = connection;
 }
Esempio n. 18
0
 internal void RemoveConnection (HttpConnection connection)
 {
   _connections.Remove (connection);
 }
 internal void RemoveConnection(HttpConnection connection)
 {
     lock (_unregisteredSync)
         _unregistered.Remove(connection);
 }