public static void Unregister(HttpContext c) { connections.Remove(c); }
private void SendInternalServerError(HttpContext context, Exception exception) { var generator = new ResponseWriter(); var response = HttpFactory.Current.Get<IResponse>(); byte[] body = Encoding.ASCII.GetBytes("Internal server error " + exception); response.Body.Write(body, 0, body.Length); response.Status = HttpStatusCode.InternalServerError; response.Reason = exception.Message; generator.Send(context, response); }
public static void Register(HttpContext c) { if (!connections.Contains(c)) connections.Add(c); }