public WriteErrorAndClose ( int statusCode ) : void | ||
statusCode | int | |
return | void |
public void WriteErrorAndClose(int statusCode)
{
WriteErrorAndClose(statusCode, null);
}
Connection::WriteErrorAndClose ( int statusCode, string message ) : void |
private void OnSocketAccept(object acceptedSocket) { if (!_shutdownInProgress) { Connection conn = new Connection(this, (Socket)acceptedSocket); // wait for at least some input if (conn.WaitForRequestBytes() == 0) { conn.WriteErrorAndClose(400); return; } // find or create host Host host = GetHost(); if (host == null) { conn.WriteErrorAndClose(500); return; } // process request in worker app domain host.ProcessRequest(conn); } }