private static void SendError(HttpStatusCode errorCode, HttpListenerContext context) { context.Response.StatusCode = (int)errorCode; }