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); }
internal void RemoveConnection (HttpConnection connection) { lock (_connectionsSync) _connections.Remove (connection); }
internal void AddConnection (HttpConnection connection) { lock (_connectionsSync) _connections[connection] = connection; }
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; } }
internal void AddConnection(HttpConnection connection) { lock (_connectionsSync) _connections[connection] = connection; }
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); } }
internal void RemoveConnection (HttpConnection connection) { lock (((ICollection) _connections).SyncRoot) _connections.Remove (connection); }
internal void AddConnection (HttpConnection connection) { lock (((ICollection) _connections).SyncRoot) _connections [connection] = connection; }
static void OnRead(IAsyncResult ares) { HttpConnection cnc = (HttpConnection)ares.AsyncState; cnc.OnReadInternal(ares); }
internal void RemoveConnection(HttpConnection cnc) { connections.Remove(cnc); }
internal void AddConnection(HttpConnection cnc) { connections [cnc] = cnc; }
internal void RemoveConnection(HttpConnection connection) { lock (_connectionsSync) _connections.Remove(connection); }
internal void AddConnection(HttpConnection cnc) { connections [cnc] = cnc; }
internal void RemoveConnection(HttpConnection cnc) { connections.Remove (cnc); }
internal void AddConnection (HttpConnection connection) { _connections [connection] = connection; }
internal void RemoveConnection (HttpConnection connection) { _connections.Remove (connection); }
internal void RemoveConnection(HttpConnection connection) { lock (_unregisteredSync) _unregistered.Remove(connection); }