.TH "KNetwork::KPassiveSocketBase" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KNetwork::KPassiveSocketBase \- Abstract base class for passive sockets.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <ksocketbase.h>\fP
.PP
Inherits \fBKNetwork::KSocketBase\fP.
.PP
Inherited by \fBKNetwork::KServerSocket\fP, and \fBKNetwork::KSocketDevice\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKPassiveSocketBase\fP ()"
.br
.ti -1c
.RI "virtual \fB~KPassiveSocketBase\fP ()"
.br
.ti -1c
.RI "virtual bool \fBbind\fP (const \fBKResolverEntry\fP &address)=0"
.br
.ti -1c
.RI "virtual bool \fBlisten\fP (int backlog)=0"
.br
.ti -1c
.RI "virtual void \fBclose\fP ()=0"
.br
.ti -1c
.RI "virtual \fBKActiveSocketBase\fP * \fBaccept\fP ()=0"
.br
.ti -1c
.RI "virtual \fBKSocketAddress\fP \fBlocalAddress\fP () const =0"
.br
.ti -1c
.RI "virtual \fBKSocketAddress\fP \fBexternalAddress\fP () const =0"
.br
.in -1c
.SH "Detailed Description"
.PP 
Abstract base class for passive sockets. 

This socket provides the initial functionality for passive sockets, i.e., sockets that accept incoming connections.
.PP
\fBAuthor:\fP
.RS 4
Thiago Macieira <thiago.macieira@kdemail.net> 
.RE
.PP

.PP
Definition at line 683 of file ksocketbase.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KPassiveSocketBase::KPassiveSocketBase ()"
.PP
Constructor. 
.PP
Definition at line 321 of file ksocketbase.cpp.
.SS "KPassiveSocketBase::~\fBKPassiveSocketBase\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Definition at line 325 of file ksocketbase.cpp.
.SH "Member Function Documentation"
.PP 
.SS "virtual bool KNetwork::KPassiveSocketBase::bind (const \fBKResolverEntry\fP & address)\fC [pure virtual]\fP"
.PP
Binds this socket to the given address. 
.PP
The socket will be constructed with the address family, socket type and protocol as those given in the \fCaddress\fP object.
.PP
\fBParameters:\fP
.RS 4
\fIaddress\fP the address to bind to 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the binding was successful, false otherwise 
.RE
.PP

.PP
Implemented in \fBKNetwork::KServerSocket\fP, \fBKNetwork::KSocketDevice\fP, and \fBKNetwork::KSocksSocketDevice\fP.
.SS "virtual bool KNetwork::KPassiveSocketBase::listen (int backlog)\fC [pure virtual]\fP"
.PP
Puts this socket into listening mode. 
.PP
Placing a socket in listening mode means that it will be allowed to receive incoming connections from remote hosts.
.PP
Note that some socket types or protocols cannot be put in listening mode.
.PP
\fBParameters:\fP
.RS 4
\fIbacklog\fP the number of accepted connections to hold before starting to refuse 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the socket is now in listening mode 
.RE
.PP

.PP
Implemented in \fBKNetwork::KServerSocket\fP, \fBKNetwork::KSocketDevice\fP, and \fBKNetwork::KSocksSocketDevice\fP.
.SS "virtual void KNetwork::KPassiveSocketBase::close ()\fC [pure virtual]\fP"
.PP
Closes this socket. 
.PP
All resources used are freed. Note that closing a passive socket does not close the connections accepted with it. 
.PP
Implemented in \fBKNetwork::KHttpProxySocketDevice\fP, \fBKNetwork::KServerSocket\fP, and \fBKNetwork::KSocketDevice\fP.
.SS "virtual \fBKActiveSocketBase\fP* KNetwork::KPassiveSocketBase::accept ()\fC [pure virtual]\fP"
.PP
Accepts a new incoming connection. 
.PP
If this socket was in listening mode, you can call this function to accept an incoming connection.
.PP
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.
.PP
Also note that descended classes will override this function to return specialised socket classes. 
.PP
Implemented in \fBKNetwork::KServerSocket\fP, \fBKNetwork::KSocketDevice\fP, and \fBKNetwork::KSocksSocketDevice\fP.
.SS "virtual \fBKSocketAddress\fP KNetwork::KPassiveSocketBase::localAddress () const\fC [pure virtual]\fP"
.PP
Returns this socket's local address. 
.PP
Implemented in \fBKNetwork::KServerSocket\fP, \fBKNetwork::KSocketDevice\fP, and \fBKNetwork::KSocksSocketDevice\fP.
.SS "virtual \fBKSocketAddress\fP KNetwork::KPassiveSocketBase::externalAddress () const\fC [pure virtual]\fP"
.PP
Returns this socket's externally-visible address if known. 
.PP
Implemented in \fBKNetwork::KHttpProxySocketDevice\fP, \fBKNetwork::KServerSocket\fP, \fBKNetwork::KSocketDevice\fP, and \fBKNetwork::KSocksSocketDevice\fP.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
