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 ()
Socket & | operator= (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.
virtual bool | isOpen () const
virtual void | shutdown ()
AbstractSocket & | operator= (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 | ( |  | ) |

Referenced by operator=(), Socket(), write(), and ~Socket().

## Socket() [2/4]

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

References log4cplus::helpers::AbstractSocket::err, log4cplus::helpers::AbstractSocket::sock, and log4cplus::helpers::AbstractSocket::state.

## 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 && |  | ) |

References LOG4CPLUS_NOEXCEPT, and Socket().

## ~Socket()

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

virtual

References Socket().

## Member Function Documentation

## operator=()

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

References LOG4CPLUS_NOEXCEPT, and Socket().

## read()

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

virtual

References read().

Referenced by read().

## write() [1/4]

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

virtual

References write().

Referenced by write(), write(), write(), and write().

## write() [2/4]

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

virtual

References write().

## write() [3/4]

template<typename... Args>

bool log4cplus::helpers::Socket::write | ( | Socket & | socket,
|  | Args &&... | args )

inline static

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

References Socket(), and write().

## write() [4/4]

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

virtual

References write().

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

- helpers/socket.h