CppWAMP
C++11 client library for the WAMP protocol
|
Go to the documentation of this file.
7 #ifndef CPPWAMP_TCPHOST_HPP
8 #define CPPWAMP_TCPHOST_HPP
20 #include "internal/socketoptions.hpp"
23 namespace boost {
namespace asio {
namespace ip {
class tcp; }}}
28 namespace internal {
class TcpOpener; }
41 TcpOptions& withBroadcast(
bool enabled =
true);
47 TcpOptions& withDoNotRoute(
bool enabled =
true);
50 TcpOptions& withKeepAlive(
bool enabled =
true);
53 TcpOptions& withLinger(
bool enabled,
int timeout);
65 TcpOptions& withReuseAddress(
bool enabled =
true);
84 template <
typename TOption,
typename... TArgs>
87 template <
typename TSocket>
void applyTo(TSocket& socket)
const;
89 internal::SocketOptionList<boost::asio::ip::tcp> options_;
91 friend class internal::TcpOpener;
112 std::string hostName,
113 std::string serviceName,
121 std::string hostName,
129 TcpHost& withOptions(TcpOptions options);
135 const std::string& hostName()
const;
138 const std::string& serviceName()
const;
141 const TcpOptions& options()
const;
250 std::string hostName_;
251 std::string serviceName_;
258 #ifndef CPPWAMP_COMPILED_LIB
259 #include "./internal/tcphost.ipp"
262 #endif // CPPWAMP_TCPHOST_HPP
TcpHost & withBroadcast(bool enabled=true)
The following setters are deprecated.
Definition: tcphost.hpp:151
TcpHost & withReceiveBufferSize(int size)
Adds the SO_RCVBUF socket option.
Definition: tcphost.hpp:193
TcpHost & withOutOfBandInline(bool enabled)
Adds the SO_OOBINLINE socket option.
Definition: tcphost.hpp:186
TcpHost & withUnicastHops(int hops)
Adds the IP_UNICAST_TTL socket option.
Definition: tcphost.hpp:228
TcpHost & withIpV6Only(bool enabled=true)
Adds the IP_V6ONLY socket option.
Definition: tcphost.hpp:235
TcpHost & withLinger(bool enabled, int timeout)
Adds the SO_LINGER socket option.
Definition: tcphost.hpp:179
TcpHost & withDoNotRoute(bool enabled=true)
Adds the SO_DONTROUTE socket option.
Definition: tcphost.hpp:165
Defines macros related to exporting/importing APIs.
TcpHost & withKeepAlive(bool enabled=true)
Adds the SO_KEEPALIVE socket option.
Definition: tcphost.hpp:172
TcpHost & withSendLowWatermark(int size)
Adds the SO_SNDLOWAT socket option.
Definition: tcphost.hpp:221
Contains TCP host address information, as well as other socket options.
Definition: tcphost.hpp:103
Definition: anyhandler.hpp:36
Contains common option definitions for raw socket transports.
RawsockMaxLength
Enumerators used to specify the maximum length of messages that a raw socket transport can receive.
Definition: rawsockoptions.hpp:22
TcpHost & withReceiveLowWatermark(int size)
Adds the SO_RCVLOWAT socket option.
Definition: tcphost.hpp:200
TcpHost & withDebug(bool enabled=true)
Adds the SO_DEBUG socket option.
Definition: tcphost.hpp:158
TcpHost & withReuseAddress(bool enabled=true)
Adds the SO_REUSEADDR socket option.
Definition: tcphost.hpp:207
TcpHost & withSendBufferSize(int size)
Adds the SO_SNDBUF socket option.
Definition: tcphost.hpp:214
Contains options for the TCP transport.
Definition: tcphost.hpp:37
TcpHost & withNoDelay(bool enabled=true)
Adds the TCP_NODELAY socket option.
Definition: tcphost.hpp:242