kget
net::BufferedSocket Class Reference
#include <bufferedsocket.h>
Inheritance diagram for net::BufferedSocket:

Detailed Description
Extends the Socket class with
Definition at line 73 of file bufferedsocket.h.
Public Member Functions | |
| BufferedSocket (bool tcp, int ip_version) | |
| BufferedSocket (int fd, int ip_version) | |
| bool | bytesReadyToWrite () const |
| Uint32 | downloadGroupID () const |
| float | getDownloadRate () const |
| int | getPollIndex () const |
| float | getUploadRate () const |
| Uint32 | readBuffered (Uint32 max_bytes_to_read, bt::TimeStamp now) |
| void | setGroupID (Uint32 gid, bool upload) |
| void | setPollIndex (int pi) |
| void | setReader (SocketReader *r) |
| void | setWriter (SocketWriter *r) |
| void | updateSpeeds (bt::TimeStamp now) |
| Uint32 | uploadGroupID () const |
| Uint32 | writeBuffered (Uint32 max, bt::TimeStamp now) |
| virtual | ~BufferedSocket () |
Constructor & Destructor Documentation
| net::BufferedSocket::BufferedSocket | ( | int | fd, | |
| int | ip_version | |||
| ) |
Definition at line 30 of file bufferedsocket.cpp.
| net::BufferedSocket::BufferedSocket | ( | bool | tcp, | |
| int | ip_version | |||
| ) |
Definition at line 40 of file bufferedsocket.cpp.
| net::BufferedSocket::~BufferedSocket | ( | ) | [virtual] |
Definition at line 51 of file bufferedsocket.cpp.
Member Function Documentation
| bool net::BufferedSocket::bytesReadyToWrite | ( | ) | const [inline] |
| Uint32 net::BufferedSocket::downloadGroupID | ( | ) | const [inline] |
| float net::BufferedSocket::getDownloadRate | ( | ) | const |
| int net::BufferedSocket::getPollIndex | ( | ) | const [inline] |
Definition at line 141 of file bufferedsocket.h.
| float net::BufferedSocket::getUploadRate | ( | ) | const |
| Uint32 net::BufferedSocket::readBuffered | ( | Uint32 | max_bytes_to_read, | |
| bt::TimeStamp | now | |||
| ) |
Reads data from the socket to the buffer.
- 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
Definition at line 84 of file bufferedsocket.cpp.
| void net::BufferedSocket::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
Definition at line 58 of file bufferedsocket.cpp.
| void net::BufferedSocket::setPollIndex | ( | int | pi | ) | [inline] |
Definition at line 142 of file bufferedsocket.h.
| void net::BufferedSocket::setReader | ( | SocketReader * | r | ) | [inline] |
Definition at line 93 of file bufferedsocket.h.
| void net::BufferedSocket::setWriter | ( | SocketWriter * | r | ) | [inline] |
Definition at line 94 of file bufferedsocket.h.
| void net::BufferedSocket::updateSpeeds | ( | bt::TimeStamp | now | ) |
| Uint32 net::BufferedSocket::uploadGroupID | ( | ) | const [inline] |
| Uint32 net::BufferedSocket::writeBuffered | ( | Uint32 | max, | |
| bt::TimeStamp | now | |||
| ) |
Writes data from the buffer to the socket.
- 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
Definition at line 159 of file bufferedsocket.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference