#include <trafficshapedsocket.h>
|
virtual void | postProcess (bt::Uint8 *data, bt::Uint32 size) |
|
Socket which supports traffic shaping
Definition at line 69 of file trafficshapedsocket.h.
◆ postProcess()
virtual void net::TrafficShapedSocket::postProcess |
( |
bt::Uint8 * |
data, |
|
|
bt::Uint32 |
size |
|
) |
| |
|
protectedvirtual |
Post process received data. Default implementation does nothing.
- Parameters
-
data | The data |
size | The size of the data |
◆ read()
virtual Uint32 net::TrafficShapedSocket::read |
( |
Uint32 |
max_bytes_to_read, |
|
|
bt::TimeStamp |
now |
|
) |
| |
|
virtual |
Reads data from the socket and pass it to the SocketReader.
- Parameters
-
max_bytes_to_read | Maximum number of bytes to read (0 is no limit) |
now | Current time stamp |
- Returns
- The number of bytes read
◆ setGroupID()
void net::TrafficShapedSocket::setGroupID |
( |
Uint32 |
gid, |
|
|
bool |
upload |
|
) |
| |
Set the group ID of the socket
- Parameters
-
gid | THe ID (0 is default group) |
upload | Whether this is an upload group or a download group |
◆ write()
virtual Uint32 net::TrafficShapedSocket::write |
( |
Uint32 |
max, |
|
|
bt::TimeStamp |
now |
|
) |
| |
|
pure virtual |
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
Implemented in net::PacketSocket.
The documentation for this class was generated from the following file: