log4cplus  2.1.0
Public Member Functions | Protected Attributes | List of all members
log4cplus::helpers::ServerSocket Class Reference

This class implements server sockets. More...

#include <socket.h>

Inheritance diagram for log4cplus::helpers::ServerSocket:
[legend]
Collaboration diagram for log4cplus::helpers::ServerSocket:
[legend]

Public Member Functions

 ServerSocket (unsigned short port, bool udp=false, bool ipv6=false, tstring const &host=tstring())
 
 ServerSocket (ServerSocket &&) LOG4CPLUS_NOEXCEPT
 
virtual ~ServerSocket ()
 
ServerSocketoperator= (ServerSocket &&) LOG4CPLUS_NOEXCEPT
 
Socket accept ()
 
void interruptAccept ()
 
void swap (ServerSocket &)
 
- Public Member Functions inherited from log4cplus::helpers::AbstractSocket
 AbstractSocket ()
 
 AbstractSocket (SOCKET_TYPE sock, SocketState state, int err)
 
 AbstractSocket (AbstractSocket const &)=delete
 
 AbstractSocket (AbstractSocket &&) LOG4CPLUS_NOEXCEPT
 
virtual ~AbstractSocket ()=0
 
virtual void close ()
 Close socket. More...
 
virtual bool isOpen () const
 
virtual void shutdown ()
 
AbstractSocketoperator= (AbstractSocket &&rhs) LOG4CPLUS_NOEXCEPT
 
void swap (AbstractSocket &)
 

Protected Attributes

std::array< std::ptrdiff_t, 2 > interruptHandles
 
- Protected Attributes inherited from log4cplus::helpers::AbstractSocket
SOCKET_TYPE sock
 
SocketState state
 
int err
 

Detailed Description

This class implements server sockets.

A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.

Definition at line 120 of file helpers/socket.h.

Constructor & Destructor Documentation

◆ ServerSocket() [1/2]

log4cplus::helpers::ServerSocket::ServerSocket ( unsigned short  port,
bool  udp = false,
bool  ipv6 = false,
tstring const &  host = tstring() 
)

◆ ServerSocket() [2/2]

log4cplus::helpers::ServerSocket::ServerSocket ( ServerSocket &&  )

◆ ~ServerSocket()

virtual log4cplus::helpers::ServerSocket::~ServerSocket ( )
virtual

Member Function Documentation

◆ accept()

Socket log4cplus::helpers::ServerSocket::accept ( )

◆ interruptAccept()

void log4cplus::helpers::ServerSocket::interruptAccept ( )

◆ operator=()

ServerSocket& log4cplus::helpers::ServerSocket::operator= ( ServerSocket &&  )

◆ swap()

void log4cplus::helpers::ServerSocket::swap ( ServerSocket )

Member Data Documentation

◆ interruptHandles

std::array<std::ptrdiff_t, 2> log4cplus::helpers::ServerSocket::interruptHandles
protected

Definition at line 134 of file helpers/socket.h.


The documentation for this class was generated from the following file: