KNetwork::KPassiveSocketBase Class Reference
Abstract base class for passive sockets. More...
#include <ksocketbase.h>
Inheritance diagram for KNetwork::KPassiveSocketBase:


Public Member Functions | |
KPassiveSocketBase () | |
virtual | ~KPassiveSocketBase () |
virtual bool | bind (const KResolverEntry &address)=0 |
virtual bool | listen (int backlog)=0 |
virtual void | close ()=0 |
virtual KActiveSocketBase * | accept ()=0 |
virtual KSocketAddress | localAddress () const =0 |
virtual KSocketAddress | externalAddress () const =0 |
Detailed Description
Abstract base class for passive sockets.This socket provides the initial functionality for passive sockets, i.e., sockets that accept incoming connections.
- Author:
- Thiago Macieira <thiago.macieira@kdemail.net>
Definition at line 672 of file ksocketbase.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 315 of file ksocketbase.cpp. |
|
Destructor.
Definition at line 319 of file ksocketbase.cpp. |
Member Function Documentation
|
Binds this socket to the given address.
The socket will be constructed with the address family, socket type and protocol as those given in the
Implemented in KNetwork::KServerSocket, KNetwork::KSocketDevice, and KNetwork::KSocksSocketDevice. |
|
Puts this socket into listening mode. Placing a socket in listening mode means that it will be allowed to receive incoming connections from remote hosts. Note that some socket types or protocols cannot be put in listening mode.
Implemented in KNetwork::KServerSocket, KNetwork::KSocketDevice, and KNetwork::KSocksSocketDevice. |
|
Closes this socket. All resources used are freed. Note that closing a passive socket does not close the connections accepted with it. Implemented in KNetwork::KHttpProxySocketDevice, KNetwork::KServerSocket, and KNetwork::KSocketDevice. |
|
Accepts a new incoming connection. If this socket was in listening mode, you can call this function to accept an incoming connection. If this function cannot accept a new connection (either because it is not listening for one or because the operation would block), it will return NULL. Also note that descended classes will override this function to return specialised socket classes. Implemented in KNetwork::KServerSocket, KNetwork::KSocketDevice, and KNetwork::KSocksSocketDevice. |
|
Returns this socket's local address.
Implemented in KNetwork::KServerSocket, KNetwork::KSocketDevice, and KNetwork::KSocksSocketDevice. |
|
Returns this socket's externally-visible address if know.
Implemented in KNetwork::KHttpProxySocketDevice, KNetwork::KServerSocket, KNetwork::KSocketDevice, and KNetwork::KSocksSocketDevice. |
The documentation for this class was generated from the following files: