|
Torc
0.1
|
A convenience class to read HTTP requests from a QTcpSocket. More...
#include <torchttpreader.h>
Public Member Functions | |
| TorcHTTPReader () | |
| ~TorcHTTPReader ()=default | |
| void | TakeRequest (QByteArray &Content, QMap< QString, QString > &Headers) |
| Take ownership of the contents and headers. New owner is responsible for deleting. More... | |
| QString | GetMethod (void) const |
| bool | Read (QTcpSocket *Socket) |
| Read and parse data from the given socket. More... | |
| bool | IsReady (void) const |
| bool | HeadersComplete (void) const |
Protected Member Functions | |
| void | Reset (void) |
| Reset the read state. More... | |
Friends | |
| class | TorcWebSocket |
A convenience class to read HTTP requests from a QTcpSocket.
Definition at line 8 of file torchttpreader.h.
| TorcHTTPReader::TorcHTTPReader | ( | ) |
Definition at line 33 of file torchttpreader.cpp.
|
default |
| QString TorcHTTPReader::GetMethod | ( | void | ) | const |
Definition at line 60 of file torchttpreader.cpp.
| bool TorcHTTPReader::HeadersComplete | ( | void | ) | const |
Definition at line 65 of file torchttpreader.cpp.
| bool TorcHTTPReader::IsReady | ( | void | ) | const |
Definition at line 55 of file torchttpreader.cpp.
| bool TorcHTTPReader::Read | ( | QTcpSocket * | Socket | ) |
Read and parse data from the given socket.
The HTTP method (e.g. GET / 200 OK), headers and content will be split out for further processing.
Definition at line 89 of file torchttpreader.cpp.
|
protected |
Reset the read state.
Definition at line 71 of file torchttpreader.cpp.
| void TorcHTTPReader::TakeRequest | ( | QByteArray & | Content, |
| QMap< QString, QString > & | Headers | ||
| ) |
Take ownership of the contents and headers. New owner is responsible for deleting.
Definition at line 47 of file torchttpreader.cpp.
|
friend |
Definition at line 10 of file torchttpreader.h.
1.8.11