#include <packetsocket.h>
|
virtual void | preProcess (bt::Packet::Ptr packet) |
|
virtual void | postProcess (bt::Uint8 *data, bt::Uint32 size) |
|
|
std::deque< bt::Packet::Ptr > | control_packets |
|
Uint32 | ctrl_packets_sent |
|
bt::Packet::Ptr | curr_packet |
|
std::deque< bt::Packet::Ptr > | data_packets |
|
Uint32 | uploaded_data_bytes |
|
Uint32 | down_gid |
|
Speed * | down_speed |
|
QMutex | mutex |
|
SocketReader * | rdr |
|
SocketDevice * | sock |
|
Uint32 | up_gid |
|
Speed * | up_speed |
|
- Author
- Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com
Extends the TrafficShapedSocket with outbound bittorrent packet queues.
Definition at line 62 of file packetsocket.h.
◆ addPacket()
void net::PacketSocket::addPacket |
( |
bt::Packet::Ptr |
packet | ) |
|
Add a packet to send
- Parameters
-
◆ clearPieces()
void net::PacketSocket::clearPieces |
( |
bool |
reject | ) |
|
Clear all pieces we are not in the progress of sending.
- Parameters
-
reject | Whether or not to send a reject |
◆ doNotSendPiece()
void net::PacketSocket::doNotSendPiece |
( |
const bt::Request & |
req, |
|
|
bool |
reject |
|
) |
| |
Do not send a piece which matches this request. But only if we are not already sending the piece.
- Parameters
-
req | The request |
reject | Whether we can send a reject instead |
◆ preProcess()
virtual void net::PacketSocket::preProcess |
( |
bt::Packet::Ptr |
packet | ) |
|
|
protectedvirtual |
Preprocess the packet data, before it is sent. Default implementation does nothing.
- Parameters
-
◆ write()
Uint32 net::PacketSocket::write |
( |
Uint32 |
max, |
|
|
bt::TimeStamp |
now |
|
) |
| |
|
overridevirtual |
Writes data to the socket. Subclasses should implement the data source.
- Parameters
-
max | The maximum number of bytes to send over the socket (0 = no limit) |
now | Current time stamp |
- Returns
- The number of bytes written
Implements net::TrafficShapedSocket.
The documentation for this class was generated from the following file: