• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

net::BufferedSocket

net::BufferedSocket Class Reference

#include <bufferedsocket.h>

Inheritance diagram for net::BufferedSocket:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Joris Guisson <joris.guisson@gmail.com>

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]

See if the socket has something ready to write.

Definition at line 113 of file bufferedsocket.h.

Uint32 net::BufferedSocket::downloadGroupID (  )  const [inline]

Get the download group ID.

Definition at line 136 of file bufferedsocket.h.

float net::BufferedSocket::getDownloadRate (  )  const

Get the current download rate.

Definition at line 66 of file bufferedsocket.cpp.

int net::BufferedSocket::getPollIndex (  )  const [inline]

Definition at line 141 of file bufferedsocket.h.

float net::BufferedSocket::getUploadRate (  )  const

Get the current download rate.

Definition at line 74 of file bufferedsocket.cpp.

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  ) 

Update up and down speed.

Definition at line 199 of file bufferedsocket.cpp.

Uint32 net::BufferedSocket::uploadGroupID (  )  const [inline]

Get the upload group ID.

Definition at line 139 of file bufferedsocket.h.

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:
  • bufferedsocket.h
  • bufferedsocket.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal