The server builds a framework for the handlers. More...
Public Member Functions | |
virtual Sint32 | start (const char *listen_address)=0 |
Starts the server listening on the given address. More... |
|
virtual void | shutdown ()=0 |
Shuts down a server that has been previously started. More... |
|
virtual Sint32 | set_default_mime_type (const char *mime_type)=0 |
Sets the default mime type to be used when no mime type was found. More... |
|
virtual void | add_mime_type (const char *extension, const char *mime_type)=0 |
Adds a new mime type to the server. More... |
|
virtual const char * | lookup_mime_type (const char *extension)=0 |
Returns the mime type registered for a certain extension. More... |
|
virtual void | install (IRequest_handler *handler)=0 |
Adds a new request handler to the server. More... |
|
virtual void | remove (IRequest_handler *handler)=0 |
Removes a previously installed request handler from the server. More... |
|
virtual void | install (ICGIRequest_handler *handler)=0 |
Adds a new CGI request handler to the server. More... |
|
virtual void | remove (ICGIRequest_handler *handler)=0 |
Removes a previously installed CGI request handler from the server. More... |
|
virtual void | install (IResponse_handler *handler)=0 |
Adds a new response handler to the server. More... |
|
virtual void | remove (IResponse_handler *handler)=0 |
Removes a previously installed response handler from the server. More... |
|
virtual void | set_identification (const char *id_string)=0 |
Sets the identification string of the server. More... |
|
virtual const char * | get_listen_address ()=0 |
Returns the listen address of the server. More... |
|
virtual Size | get_nr_of_connections ()=0 |
Returns the number of existing HTTP connections in this server. More... |
|
virtual Size | get_nr_of_active_connections ()=0 |
Returns the number of HTTP connections in this server which actually handle requests. More... |
|
virtual void | set_keep_alive_timeout (Uint32 nr_of_seconds)=0 |
Sets the idle timeout for keep-alive connections. More... |
|
virtual Uint32 | get_keep_alive_timeout () const =0 |
Returns the idle timeout for keep-alive connections. More... |
|
virtual void | set_send_buffer_size (Uint32 send_buffer_size)=0 |
Sets the send buffer size of the socket. More... |
|
virtual Uint32 | get_send_buffer_size () const =0 |
Returns the send buffer size of the socket. More... |
|
virtual void | set_http_post_body_limit (Uint32 http_post_body_limit)=0 |
Sets the size limit for the body of HTTP POST requests. More... |
|
virtual Uint32 | get_http_post_body_limit () const =0 |
Returns the size limit for the body of HTTP POST requests. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x9923b273, 0x082f, 0x403a, 0x83, 0x57, 0xcd, 0x23, 0x9b, 0xcf, 0x68, 0x4c > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, IInterface > |
Self |
Own type. More... |
|
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > |
IID |
Declares the interface ID (IID) of this interface. More... |
|
Static Public Member Functions inherited from mi::base::Interface_declare< 0x9923b273, 0x082f, 0x403a, 0x83, 0x57, 0xcd, 0x23, 0x9b, 0xcf, 0x68, 0x4c > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
The server builds a framework for the handlers.
|
pure virtual |
Adds a new mime type to the server.
The server will use the given extension
/ mime_type
pairs to set the content-type header in the response based on the extension of the requested URL. Note that a handler may overwrite the mime type (as any header field), if necessary.
extension | The extension identifiying the mime type. |
mime_type | The mime type to be set when the extension was found. |
|
pure virtual |
Returns the size limit for the body of HTTP POST requests.
|
pure virtual |
Returns the idle timeout for keep-alive connections.
|
pure virtual |
Returns the listen address of the server.
|
pure virtual |
Returns the number of HTTP connections in this server which actually handle requests.
|
pure virtual |
Returns the number of existing HTTP connections in this server.
|
pure virtual |
Returns the send buffer size of the socket.
|
pure virtual |
Adds a new request handler to the server.
handler | The handler to be installed. |
|
pure virtual |
Adds a new CGI request handler to the server.
handler | The handler to be installed. |
|
pure virtual |
Adds a new response handler to the server.
handler | The handler to be installed. |
|
pure virtual |
Returns the mime type registered for a certain extension.
extension | The file extension to lookup. |
NULL
.
|
pure virtual |
Removes a previously installed request handler from the server.
handler | The handler to be removed. |
|
pure virtual |
Removes a previously installed CGI request handler from the server.
handler | The handler to be removed. |
|
pure virtual |
Removes a previously installed response handler from the server.
handler | The handler to be removed. |
|
pure virtual |
Sets the default mime type to be used when no mime type was found.
mime_type | The default mime type. |
|
pure virtual |
Sets the size limit for the body of HTTP POST requests.
http_post_body_limit | The new size limit. |
|
pure virtual |
Sets the identification string of the server.
This string is automatically put in the "Server" header of each response. A handler might overwrite it, if necessary on a per URL basis.
id_string | The identification string. |
|
pure virtual |
Sets the idle timeout for keep-alive connections.
The default is not to timeout.
nr_of_seconds | Seconds of idleness allowed before the server closes the connection. |
|
pure virtual |
Sets the send buffer size of the socket.
Increasing the buffer size can be useful in the case of high latency connections.
send_buffer_size | Size of socket send buffer. |
|
pure virtual |
Shuts down a server that has been previously started.
The server will stop accepting new requests and shut down as fast as possible. However, requests currently being handled will be served until they are done.
|
pure virtual |
Starts the server listening on the given address.
The server will run within a separate thread; all requests will be handled in their own threads as well.
listen_address | The address to listen on. |