![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtAbstractHttpConnector class is a base class for defining HTTP-based protocols for use with QxtHttpSessionManager More...
#include <QxtAbstractHttpConnector>
Inherits QObject.
Inherited by QxtHttpServerConnector and QxtScgiServerConnector.
The QxtAbstractHttpConnector class is a base class for defining HTTP-based protocols for use with QxtHttpSessionManager
QxtHttpSessionManager does the work of managing sessions and state for the otherwise stateless HTTP protocol, but it relies on QxtAbstractHttpConnector subclasses to implement the protocol used to communicate with the web server.
Subclasses are responsible for accepting new connections (by implementing listen(const QHostAddress&, quint16) and invoking addConnection(QIODevice*)), for informing the session manager when request headers are available (by implementing canParseRequest(const QByteArray&)), for parsing the request headers (by implementing parseRequest(QByteArray&)), and for writing response headers (by implementing writeHeaders(QIODevice*, const QHttpResponseHeader&)).
See also QxtHttpSessionManager.
Creates a QxtAbstractHttpConnector with the specified parent.
Note that this is an abstract class and cannot be instantiated directly.
Starts managing a new connection from device.
This function should be invoked by a subclass to attach incoming connections to the session manager.
Returns true if a complete set of request headers can be extracted from the provided buffer.
Invoked by the session manager to indicate that the connector should listen for incoming connections on the specified interface and port.
If the interface is QHostAddress::Any, the server will listen on all network interfaces.
Returns true on success, or false if the server could not begin listening.
See also addConnection(QIODevice*).
Extracts a set of request headers from the provided buffer.
Subclasses implementing this function must be sure to remove the parsed data from the buffer.
Returns the session manager into which the connector is installed.
See also QxtHttpSessionManager::setConnector.
Writes a the response header to the specified device.
Copyright © 2007-2010 Qxt Foundation |
Qxt 0.6.1 |