24 #ifndef LOG4CPLUS_HELPERS_SOCKET_HEADER_
25 #define LOG4CPLUS_HELPERS_SOCKET_HEADER_
29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
66 virtual
bool isOpen() const;
67 virtual
void shutdown();
90 bool udp =
false,
bool ipv6 =
false);
99 virtual
bool write(const std::
string & buffer);
100 virtual
bool write(std::
size_t bufferCount,
103 template <typename... Args>
108 return socket.write (
sizeof... (args), buffers);
130 void interruptAccept ();
134 std::array<std::ptrdiff_t, 2> interruptHandles;
141 unsigned short port,
bool udp,
bool ipv6,
SocketState& state);
144 unsigned short port,
bool udp,
bool ipv6,
SocketState& state);
155 const std::
string & buffer);
AbstractSocket(AbstractSocket &&) LOG4CPLUS_NOEXCEPT
AbstractSocket(SOCKET_TYPE sock, SocketState state, int err)
AbstractSocket(AbstractSocket const &)=delete
This class implements server sockets.
ServerSocket(unsigned short port, bool udp=false, bool ipv6=false, tstring const &host=tstring())
ServerSocket(ServerSocket &&) LOG4CPLUS_NOEXCEPT
This class implements client sockets (also called just "sockets").
Socket(Socket &&) LOG4CPLUS_NOEXCEPT
Socket(const tstring &address, unsigned short port, bool udp=false, bool ipv6=false)
Socket(SOCKET_TYPE sock, SocketState state, int err)
#define LOG4CPLUS_NOEXCEPT
LOG4CPLUS_EXPORT SOCKET_TYPE const INVALID_SOCKET_VALUE
LOG4CPLUS_EXPORT long read(SOCKET_TYPE sock, SocketBuffer &buffer)
LOG4CPLUS_EXPORT int closeSocket(SOCKET_TYPE sock)
LOG4CPLUS_EXPORT SOCKET_TYPE acceptSocket(SOCKET_TYPE sock, SocketState &state)
LOG4CPLUS_EXPORT int setTCPNoDelay(SOCKET_TYPE, bool)
LOG4CPLUS_EXPORT tstring getHostname(bool fqdn)
LOG4CPLUS_EXPORT SOCKET_TYPE connectSocket(const log4cplus::tstring &hostn, unsigned short port, bool udp, bool ipv6, SocketState &state)
LOG4CPLUS_EXPORT long write(SOCKET_TYPE sock, const SocketBuffer &buffer)
LOG4CPLUS_EXPORT SOCKET_TYPE openSocket(unsigned short port, bool udp, bool ipv6, SocketState &state)
LOG4CPLUS_EXPORT int shutdownSocket(SOCKET_TYPE sock)
std::ptrdiff_t SOCKET_TYPE
std::basic_string< tchar > tstring