log4cplus  2.1.0
Public Member Functions | Static Public Member Functions | List of all members
log4cplus::helpers::Socket Class Reference

This class implements client sockets (also called just "sockets"). More...

#include <socket.h>

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

Public Member Functions

 Socket ()
 
 Socket (SOCKET_TYPE sock, SocketState state, int err)
 
 Socket (const tstring &address, unsigned short port, bool udp=false, bool ipv6=false)
 
 Socket (Socket &&) LOG4CPLUS_NOEXCEPT
 
virtual ~Socket ()
 
Socketoperator= (Socket &&) LOG4CPLUS_NOEXCEPT
 
virtual bool read (SocketBuffer &buffer)
 
virtual bool write (const SocketBuffer &buffer)
 
virtual bool write (const std::string &buffer)
 
virtual bool write (std::size_t bufferCount, SocketBuffer const *const *buffers)
 
- 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 &)
 

Static Public Member Functions

template<typename... Args>
static bool write (Socket &socket, Args &&... args)
 

Additional Inherited Members

- Protected Attributes inherited from log4cplus::helpers::AbstractSocket
SOCKET_TYPE sock
 
SocketState state
 
int err
 

Detailed Description

This class implements client sockets (also called just "sockets").

A socket is an endpoint for communication between two machines.

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

Constructor & Destructor Documentation

◆ Socket() [1/4]

log4cplus::helpers::Socket::Socket ( )

◆ Socket() [2/4]

log4cplus::helpers::Socket::Socket ( SOCKET_TYPE  sock,
SocketState  state,
int  err 
)

◆ Socket() [3/4]

log4cplus::helpers::Socket::Socket ( const tstring address,
unsigned short  port,
bool  udp = false,
bool  ipv6 = false 
)

◆ Socket() [4/4]

log4cplus::helpers::Socket::Socket ( Socket &&  )

◆ ~Socket()

virtual log4cplus::helpers::Socket::~Socket ( )
virtual

Member Function Documentation

◆ operator=()

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

◆ read()

virtual bool log4cplus::helpers::Socket::read ( SocketBuffer buffer)
virtual

◆ write() [1/4]

virtual bool log4cplus::helpers::Socket::write ( const SocketBuffer buffer)
virtual

◆ write() [2/4]

virtual bool log4cplus::helpers::Socket::write ( const std::string &  buffer)
virtual

◆ write() [3/4]

template<typename... Args>
static bool log4cplus::helpers::Socket::write ( Socket socket,
Args &&...  args 
)
inlinestatic

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

◆ write() [4/4]

virtual bool log4cplus::helpers::Socket::write ( std::size_t  bufferCount,
SocketBuffer const *const *  buffers 
)
virtual

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