libktorrent
2.2.0
|
#include <streamsocket.h>
Public Member Functions | |
StreamSocket (bool tcp, int ip_version, StreamSocketListener *listener) | |
void | addData (const QByteArray &data) |
bool | bytesReadyToWrite () const override |
See if the socket has something ready to write. | |
bt::Uint32 | write (bt::Uint32 max, bt::TimeStamp now) override |
![]() | |
TrafficShapedSocket (bool tcp, int ip_version) | |
TrafficShapedSocket (int fd, int ip_version) | |
TrafficShapedSocket (SocketDevice *sock) | |
Uint32 | downloadGroupID () const |
Get the download group ID. | |
int | getDownloadRate () const |
Get the current download rate. | |
int | getUploadRate () const |
Get the current download rate. | |
virtual Uint32 | read (Uint32 max_bytes_to_read, bt::TimeStamp now) |
void | setGroupID (Uint32 gid, bool upload) |
void | setReader (SocketReader *r) |
Set the reader. | |
SocketDevice * | socketDevice () |
Get the SocketDevice. | |
const SocketDevice * | socketDevice () const |
Get the SocketDevice (const vesion) | |
void | updateSpeeds (bt::TimeStamp now) |
Update up and down speed. | |
Uint32 | uploadGroupID () const |
Get the upload group ID. | |
virtual Uint32 | write (Uint32 max, bt::TimeStamp now)=0 |
Additional Inherited Members | |
![]() | |
virtual void | postProcess (bt::Uint8 *data, bt::Uint32 size) |
![]() | |
Uint32 | down_gid |
Speed * | down_speed |
QMutex | mutex |
SocketReader * | rdr |
SocketDevice * | sock |
Uint32 | up_gid |
Speed * | up_speed |
TrafficShapedSocket which provides a simple buffer as outbound data queue. And a callback interface (StreamSocketListener) for notification of events.
Definition at line 68 of file streamsocket.h.
void net::StreamSocket::addData | ( | const QByteArray & | data | ) |
Add data to send
data | The QByteArray |