kget
bt::HttpConnection Class Reference
#include <httpconnection.h>

Detailed Description
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.
Public Member Functions | |
| bool | closed () const |
| bool | connected () const |
| void | connectTo (const KUrl &url) |
| void | connectToProxy (const QString &proxy, Uint16 proxy_port) |
| bool | get (const QString &host, const QString &path, bt::Uint64 start, bt::Uint64 len) |
| bool | getData (QByteArray &data) |
| float | getDownloadRate () const |
| const QString | getStatusString () const |
| virtual bool | hasBytesToWrite () const |
| HttpConnection () | |
| bool | ok () const |
| virtual void | onDataReady (Uint8 *buf, Uint32 size) |
| virtual Uint32 | onReadyToWrite (Uint8 *data, Uint32 max_to_write) |
| void | setGroupIDs (Uint32 up, Uint32 down) |
| virtual | ~HttpConnection () |
Constructor & Destructor Documentation
| bt::HttpConnection::HttpConnection | ( | ) |
Definition at line 34 of file httpconnection.cpp.
| bt::HttpConnection::~HttpConnection | ( | ) | [virtual] |
Definition at line 43 of file httpconnection.cpp.
Member Function Documentation
| bool bt::HttpConnection::closed | ( | ) | const |
| bool bt::HttpConnection::connected | ( | ) | const |
| void bt::HttpConnection::connectTo | ( | const KUrl & | url | ) |
Connect to a webseed.
- Parameters:
-
url Url of the webseeder
Definition at line 98 of file httpconnection.cpp.
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
Definition at line 89 of file httpconnection.cpp.
| bool bt::HttpConnection::get | ( | const QString & | host, | |
| const QString & | path, | |||
| bt::Uint64 | start, | |||
| bt::Uint64 | len | |||
| ) |
Do a HTTP GET request.
- Parameters:
-
path The path of the file start Offset into file len Length of data to download
Definition at line 233 of file httpconnection.cpp.
| 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
Definition at line 245 of file httpconnection.cpp.
| float bt::HttpConnection::getDownloadRate | ( | ) | const |
| const QString bt::HttpConnection::getStatusString | ( | ) | const |
| bool bt::HttpConnection::hasBytesToWrite | ( | ) | const [virtual] |
Check if data is ready to write.
Implements net::SocketWriter.
Definition at line 177 of file httpconnection.cpp.
| bool bt::HttpConnection::ok | ( | ) | const |
Definition at line 107 of file httpconnection.cpp.
Definition at line 133 of file httpconnection.cpp.
Set the group ID's of the socket.
- Parameters:
-
up Upload group id down Download group id
Definition at line 54 of file httpconnection.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference