libktorrent  2.1.1
Public Member Functions | List of all members
net::StreamSocket Class Reference

#include <streamsocket.h>

Inheritance diagram for net::StreamSocket:
Inheritance graph
[legend]

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
 
- Public Member Functions inherited from net::TrafficShapedSocket
 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.
 
SocketDevicesocketDevice ()
 Get the SocketDevice.
 
const SocketDevicesocketDevice () 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

- Protected Member Functions inherited from net::TrafficShapedSocket
virtual void postProcess (bt::Uint8 *data, bt::Uint32 size)
 
- Protected Attributes inherited from net::TrafficShapedSocket
Uint32 down_gid
 
Speeddown_speed
 
QMutex mutex
 
SocketReaderrdr
 
SocketDevicesock
 
Uint32 up_gid
 
Speedup_speed
 

Detailed Description

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.

Member Function Documentation

◆ addData()

void net::StreamSocket::addData ( const QByteArray &  data)

Add data to send

Parameters
dataThe QByteArray

The documentation for this class was generated from the following file: