#include <httpconnection.h>
|
void | startReplyTimer (int timeout) |
|
void | stopConnectTimer () |
|
void | stopReplyTimer () |
|
|
bool | closed () const |
| Has the connection been closed.
|
|
bool | connected () const |
| See if we are connected.
|
|
void | connectFinished (bool succeeded) override |
|
void | connectTo (const QUrl &url) |
|
void | connectToProxy (const QString &proxy, Uint16 proxy_port) |
|
void | dataSent () override |
|
bool | get (const QString &host, const QString &path, const QString &query, bt::Uint64 start, bt::Uint64 len) |
|
bool | getData (QByteArray &data) |
|
int | getDownloadRate () const |
| Get the current download rate.
|
|
const QString | getStatusString () const |
| Get the status string.
|
|
bool | isRedirected () const |
| Is this connection redirected.
|
|
bool | ok () const |
| Check if the connection is OK.
|
|
void | onDataReady (Uint8 *buf, Uint32 size) override |
|
bool | ready () const |
| Ready to do another request.
|
|
QUrl | redirectedUrl () const |
| Get the redirected url.
|
|
int | responseCode () const |
| Get the last http response code.
|
|
void | setGroupIDs (Uint32 up, Uint32 down) |
|
- Author
- Joris Guisson
HTTP connection for webseeding. We do not use KIO here, because we want to be able to apply the maximum upload and download rate to webseeds;
Definition at line 41 of file httpconnection.h.
◆ connectFinished()
void bt::HttpConnection::connectFinished |
( |
bool |
succeeded | ) |
|
|
overridevirtual |
◆ connectTo()
void bt::HttpConnection::connectTo |
( |
const QUrl & |
url | ) |
|
Connect to a webseed
- Parameters
-
◆ connectToProxy()
void bt::HttpConnection::connectToProxy |
( |
const QString & |
proxy, |
|
|
Uint16 |
proxy_port |
|
) |
| |
Connect to a proxy.
- Parameters
-
proxy | The HTTP proxy to use (null means don't use any) |
proxy_port | The port of the HTTP proxy |
◆ dataSent()
void bt::HttpConnection::dataSent |
( |
| ) |
|
|
overridevirtual |
◆ get()
bool bt::HttpConnection::get |
( |
const QString & |
host, |
|
|
const QString & |
path, |
|
|
const QString & |
query, |
|
|
bt::Uint64 |
start, |
|
|
bt::Uint64 |
len |
|
) |
| |
Do a HTTP GET request
- Parameters
-
path | The path of the file |
query | The query string for the url |
start | Offset into file |
len | Length of data to download |
◆ getData()
bool bt::HttpConnection::getData |
( |
QByteArray & |
data | ) |
|
Get some part of the
- Parameters
-
data | Bytearray to copy the data into |
- Returns
- true if data was filled in
◆ onDataReady()
void bt::HttpConnection::onDataReady |
( |
Uint8 * |
buf, |
|
|
Uint32 |
size |
|
) |
| |
|
overridevirtual |
Function which will be called whenever data has been read from the socket. This data should be dealt with, otherwise it will be discarded.
- Parameters
-
buf | The buffer |
size | The size of the buffer |
Implements net::SocketReader.
◆ setGroupIDs()
void bt::HttpConnection::setGroupIDs |
( |
Uint32 |
up, |
|
|
Uint32 |
down |
|
) |
| |
Set the group ID's of the socket
- Parameters
-
up | Upload group id |
down | Download group id |
The documentation for this class was generated from the following file: