UDK 3.2.7 C/C++ API Reference
Public Member Functions
osl::AcceptorSocket Class Reference

Allows to accept socket connections. More...

#include <socket_decl.hxx>

Inheritance diagram for osl::AcceptorSocket:
osl::Socket

List of all members.

Public Member Functions

 AcceptorSocket (oslAddrFamily Family=osl_Socket_FamilyInet, oslProtocol Protocol=osl_Socket_ProtocolIp, oslSocketType Type=osl_Socket_TypeStream)
sal_Bool listen (sal_Int32 MaxPendingConnections=-1)
 Prepare a socket for the accept-call.
oslSocketResult acceptConnection (StreamSocket &Connection)
 Accepts incoming connections on the socket.
oslSocketResult acceptConnection (StreamSocket &Connection, SocketAddr &PeerAddr)
 Accepts incoming connections on the socket.

Detailed Description

Allows to accept socket connections.


Constructor & Destructor Documentation

osl::AcceptorSocket::AcceptorSocket ( oslAddrFamily  Family = osl_Socket_FamilyInet,
oslProtocol  Protocol = osl_Socket_ProtocolIp,
oslSocketType  Type = osl_Socket_TypeStream 
) [inline]

Member Function Documentation

oslSocketResult osl::AcceptorSocket::acceptConnection ( StreamSocket Connection) [inline]

Accepts incoming connections on the socket.

You must precede this call with osl::Socket::bind() and listen().

Parameters:
Connectionreceives the incoming connection.
Returns:
osl_Socket_Ok, if a connection has been accepted, osl_Socket_TimedOut, if m_RecvTimeout milliseconds passed without connect, osl_Socket_Error on errors.
oslSocketResult osl::AcceptorSocket::acceptConnection ( StreamSocket Connection,
SocketAddr PeerAddr 
) [inline]

Accepts incoming connections on the socket.

You must precede this call with osl::Socket::bind() and listen().

Parameters:
PeerAddrreceives the address of the connecting entity (your communication partner).
Connectionreceives the incoming connection.
Returns:
osl_Socket_Ok, if a connection has been accepted, osl_Socket_TimedOut, if m_RecvTimeout milliseconds passed without connect, osl_Socket_Error on errors.
sal_Bool osl::AcceptorSocket::listen ( sal_Int32  MaxPendingConnections = -1) [inline]

Prepare a socket for the accept-call.

The socket must have been bound before to the local address.

Parameters:
MaxPendingConnectionsThe maximum number of pending connections (waiting to be accepted) on this socket. If you use -1, a system default value is used.
Returns:
sal_True if call was successful.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines