CppWAMP
C++11 client library for the WAMP protocol
wamp::UdsPath Class Reference

Contains a Unix domain socket path, as well as other socket options. More...

#include <cppwamp/udspath.hpp>

Public Member Functions

 UdsPath (std::string pathName, UdsOptions options={}, RawsockMaxLength maxRxLength=defaultMaxRxLength)
 Converting constructor taking a path name. More...
 
UdsPathwithOptions (UdsOptions options)
 Specifies the socket options to use.
 
UdsPathwithMaxRxLength (RawsockMaxLength length)
 Specifies the maximum length permitted for incoming messages.
 
const std::string & pathName () const
 Obtains the path name.
 
const UdsOptionsoptions () const
 Obtains the transport options.
 
RawsockMaxLength maxRxLength () const
 Obtains the specified maximum incoming message length.
 
UdsPathwithBroadcast (bool enabled=true)
 The following setters are deprecated. More...
 
UdsPathwithDebug (bool enabled=true)
 Adds the SO_DEBUG socket option. More...
 
UdsPathwithDoNotRoute (bool enabled=true)
 Adds the SO_DONTROUTE socket option. More...
 
UdsPathwithKeepAlive (bool enabled=true)
 Adds the SO_KEEPALIVE socket option. More...
 
UdsPathwithOutOfBandInline (bool enabled)
 Adds the SO_OOBINLINE socket option. More...
 
UdsPathwithLinger (bool enabled, int timeout)
 Adds the SO_LINGER socket option. More...
 
UdsPathwithReceiveBufferSize (int size)
 Adds the SO_RCVBUF socket option. More...
 
UdsPathwithReceiveLowWatermark (int size)
 Adds the SO_RCVLOWAT socket option. More...
 
UdsPathwithReuseAddress (bool enabled=true)
 Adds the SO_REUSEADDR socket option. More...
 
UdsPathwithSendBufferSize (int size)
 Adds the SO_SNDBUF socket option. More...
 
UdsPathwithSendLowWatermark (int size)
 Adds the SO_SNDLOWAT socket option. More...
 

Static Public Attributes

static constexpr RawsockMaxLength defaultMaxRxLength
 The default maximum length permitted for incoming messages.
 

Related Functions

(Note that these are not member functions.)

template<typename TCodec >
Connector::Ptr connector (AnyIoExecutor exec, UdsPath path)
 Creates a Connector that can establish a Unix domain socket transport. More...
 

Detailed Description

Contains a Unix domain socket path, as well as other socket options.

See also
RawsockOptions, connector

Constructor & Destructor Documentation

◆ UdsPath()

wamp::UdsPath::UdsPath ( std::string  pathName,
UdsOptions  options = {},
RawsockMaxLength  maxRxLength = defaultMaxRxLength 
)

Converting constructor taking a path name.

Parameters
pathNamePath name of the Unix domain socket.
optionsSocket options.
maxRxLengthMaximum inbound message length

Member Function Documentation

◆ withBroadcast()

UdsPath& wamp::UdsPath::withBroadcast ( bool  enabled = true)
inline

The following setters are deprecated.

Socket options should be passed via the constructor or set via UdsPath::withOptions. Adds the SO_BROADCAST socket option.

Deprecated:

◆ withDebug()

UdsPath& wamp::UdsPath::withDebug ( bool  enabled = true)
inline

Adds the SO_DEBUG socket option.

Deprecated:

◆ withDoNotRoute()

UdsPath& wamp::UdsPath::withDoNotRoute ( bool  enabled = true)
inline

Adds the SO_DONTROUTE socket option.

Deprecated:

◆ withKeepAlive()

UdsPath& wamp::UdsPath::withKeepAlive ( bool  enabled = true)
inline

Adds the SO_KEEPALIVE socket option.

Deprecated:

◆ withOutOfBandInline()

UdsPath& wamp::UdsPath::withOutOfBandInline ( bool  enabled)
inline

Adds the SO_OOBINLINE socket option.

Deprecated:

◆ withLinger()

UdsPath& wamp::UdsPath::withLinger ( bool  enabled,
int  timeout 
)
inline

Adds the SO_LINGER socket option.

Deprecated:

◆ withReceiveBufferSize()

UdsPath& wamp::UdsPath::withReceiveBufferSize ( int  size)
inline

Adds the SO_RCVBUF socket option.

Deprecated:

◆ withReceiveLowWatermark()

UdsPath& wamp::UdsPath::withReceiveLowWatermark ( int  size)
inline

Adds the SO_RCVLOWAT socket option.

Deprecated:

◆ withReuseAddress()

UdsPath& wamp::UdsPath::withReuseAddress ( bool  enabled = true)
inline

Adds the SO_REUSEADDR socket option.

Deprecated:

◆ withSendBufferSize()

UdsPath& wamp::UdsPath::withSendBufferSize ( int  size)
inline

Adds the SO_SNDBUF socket option.

Deprecated:

◆ withSendLowWatermark()

UdsPath& wamp::UdsPath::withSendLowWatermark ( int  size)
inline

Adds the SO_SNDLOWAT socket option.

Deprecated:

Friends And Related Function Documentation

◆ connector()

template<typename TCodec >
Connector::Ptr connector ( AnyIoExecutor  exec,
UdsPath  path 
)
related

Creates a Connector that can establish a Unix domain socket transport.

This overload takes an executor that is convertible to the boost::asio::any_io_executor polymorphic wrapper.

Returns
a std::shared_ptr to a Connector
Template Parameters
TCodecThe serialization to use over this transport.
See also
Connector, Json, Msgpack
Parameters
execThe executor to be used by the transport.
pathUnix domain socket path and other socket options.

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