See Also: IResponder Members
In addition to implementing this interface, a potential responder must contain a constructor accepting a single parameter of type Mono.FastCgi.ResponderRequest.
To register a responder with a server, use Server.SetResponder(Type).
C# Example
class MyResponder : IResponder
{
ResponderRequest req;
public MyResponder (ResponderRequest request)
{
req = request;
}
public int Process ()
{
req.SendOutput ("Content-Type: text/html\r\n\r\n");
req.SendOutput ("<html>\n <head><title>Test</title></head>\n");
req.SendOutput (" <body>\n Server name: ");
req.SendOutput (GetParameter ("SERVER_NAME"));
req.SendOutput ("\n </body>\n</html>");
return 0;
}
public ResponderRequest Request {
get {return req;}
}
}
...
server.SetResponder (typeof (MyRequest));