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

kget

net::Socket

net::Socket Class Reference

#include <socket.h>

Inheritance diagram for net::Socket:

Inheritance graph
[legend]

List of all members.


Detailed Description

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

Definition at line 33 of file socket.h.


Public Types

enum  State {
  IDLE, CONNECTING, CONNECTED, BOUND,
  CLOSED
}

Public Member Functions

int accept (Address &a)
bool bind (const QString &ip, Uint16 port, bool also_listen)
Uint32 bytesAvailable () const
void close ()
bool connectSuccesFull ()
bool connectTo (const Address &addr)
int fd () const
const Address & getPeerName () const
bool isIPv4 () const
bool isIPv6 () const
bool ok () const
int recv (bt::Uint8 *buf, int max_len)
int recvFrom (bt::Uint8 *buf, int max_size, Address &addr)
int send (const bt::Uint8 *buf, int len)
int sendTo (const bt::Uint8 *buf, int size, const Address &addr)
void setNonBlocking ()
void setRemoteAddress (const Address &a)
bool setTOS (unsigned char type_of_service)
 Socket (bool tcp, int ip_version)
 Socket (int fd, int ip_version)
State state () const
virtual ~Socket ()

Member Enumeration Documentation

enum net::Socket::State

Enumerator:
IDLE 
CONNECTING 
CONNECTED 
BOUND 
CLOSED 

Definition at line 36 of file socket.h.


Constructor & Destructor Documentation

net::Socket::Socket ( int  fd,
int  ip_version 
) [explicit]

Definition at line 62 of file socket.cpp.

net::Socket::Socket ( bool  tcp,
int  ip_version 
) [explicit]

Definition at line 78 of file socket.cpp.

net::Socket::~Socket (  )  [virtual]

Definition at line 98 of file socket.cpp.


Member Function Documentation

int net::Socket::accept ( Address &  a  ) 

Definition at line 265 of file socket.cpp.

bool net::Socket::bind ( const QString &  ip,
Uint16  port,
bool  also_listen 
)

Definition at line 160 of file socket.cpp.

Uint32 net::Socket::bytesAvailable (  )  const

Definition at line 311 of file socket.cpp.

void net::Socket::close (  ) 

Definition at line 111 of file socket.cpp.

bool net::Socket::connectSuccesFull (  ) 

See if a connectTo was succesfull in non blocking mode.

Definition at line 323 of file socket.cpp.

bool net::Socket::connectTo ( const Address &  addr  ) 

Definition at line 135 of file socket.cpp.

int net::Socket::fd (  )  const [inline]

Definition at line 60 of file socket.h.

const Address& net::Socket::getPeerName (  )  const [inline]

Definition at line 62 of file socket.h.

bool net::Socket::isIPv4 (  )  const [inline]

Definition at line 65 of file socket.h.

bool net::Socket::isIPv6 (  )  const [inline]

Definition at line 66 of file socket.h.

bool net::Socket::ok (  )  const [inline]

Definition at line 59 of file socket.h.

int net::Socket::recv ( bt::Uint8 *  buf,
int  max_len 
)

Definition at line 206 of file socket.cpp.

int net::Socket::recvFrom ( bt::Uint8 *  buf,
int  max_size,
Address &  addr 
)

Definition at line 248 of file socket.cpp.

int net::Socket::send ( const bt::Uint8 *  buf,
int  len 
)

Definition at line 188 of file socket.cpp.

int net::Socket::sendTo ( const bt::Uint8 *  buf,
int  size,
const Address &  addr 
)

Definition at line 230 of file socket.cpp.

void net::Socket::setNonBlocking (  ) 

Definition at line 126 of file socket.cpp.

void net::Socket::setRemoteAddress ( const Address &  a  )  [inline]

Set the remote address, used by Socks to set the actual address.

Parameters:
addr The address

Definition at line 75 of file socket.h.

bool net::Socket::setTOS ( unsigned char  type_of_service  ) 

Definition at line 282 of file socket.cpp.

State net::Socket::state (  )  const [inline]

Definition at line 64 of file socket.h.


The documentation for this class was generated from the following files:
  • socket.h
  • socket.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