CppWAMP
C++11 client library for the WAMP protocol
|
Namespaces | |
error | |
Classes | |
class | Abort |
Provides the reason URI and other options contained within ABORT messages. More... | |
class | AnyReusableHandler |
Type-erases a multi-shot, copyable callback handler. More... | |
class | Authentication |
Provides the Signature and Extra dictionary contained within WAMP AUTHENTICATE messages. More... | |
class | BasicCborDecoder |
CBOR decoder. More... | |
class | BasicCborDecoder< I, StreamInputCategory > |
CBOR decoder specialization for stream inputs. More... | |
class | BasicCborEncoder |
CBOR encoder. More... | |
class | BasicCborEncoder< O, StreamOutputCategory > |
CBOR encoder specialization for streams. More... | |
class | BasicJsonDecoder |
JSON decoder. More... | |
class | BasicJsonDecoder< I, StreamInputCategory > |
JSON decoder specialization for stream inputs. More... | |
class | BasicJsonEncoder |
JSON encoder. More... | |
class | BasicMsgpackDecoder |
Decoder specialization for Msgpack. More... | |
class | BasicMsgpackDecoder< I, StreamInputCategory > |
Decoder specialization for Msgpack and stream inputs. More... | |
class | BasicMsgpackEncoder |
Msgpack encoder. More... | |
class | BasicMsgpackEncoder< O, StreamOutputCategory > |
Msgpack encoder specialization for streams. More... | |
class | Blob |
Contains binary data as an array of bytes. More... | |
struct | ByteArrayInputCategory |
Input category for contiguous byte arrays which provide data and size member functions. More... | |
struct | ByteContainerOutputCategory |
Output category for containers of bytes which provide push_back and insert member functions. More... | |
class | CallCancellation |
Contains the request ID and options contained within WAMP CANCEL messages. More... | |
class | CallChit |
Lightweight token representing a call request. More... | |
struct | Cbor |
CBOR format tag type. More... | |
class | Challenge |
Provides the AuthMethod and Extra dictionary contained within WAMP CHALLENGE messages. More... | |
class | Connector |
Abstract base class for establishing client transport endpoints. More... | |
class | ConversionAccess |
Helper class used to gain access to private conversion member functions. More... | |
class | CoroEventUnpacker |
Wrapper around an event coroutine slot which automatically unpacks positional payload arguments. More... | |
class | CoroInvocationUnpacker |
Wrapper around a call coroutine slot which automatically unpacks positional payload arguments. More... | |
class | CoroSession |
Coroutine API used by a client peer in WAMP applications. More... | |
class | DecodingCategory |
std::error_category used for reporting deserialization errors. More... | |
struct | Deferment |
Tag type that can be passed to wamp::Outcome to construct a deferred outcome. More... | |
class | Error |
Provides the reason URI, options, and payload arguments contained within WAMP ERROR messages. More... | |
class | ErrorOr |
Minimalistic implementation of std::expected<T, std::error_code> More... | |
class | Event |
Provides the subscription/publication ids, options, and payload contained within WAMP EVENT messages. More... | |
class | EventUnpacker |
Wrapper around an event slot which automatically unpacks positional payload arguments. More... | |
class | FromVariantConverter |
Wrapper around a source Variant, used for conversions. More... | |
struct | InputCategory |
Traits class that determines the category type that best matches the given input type. More... | |
class | Interruption |
Contains details within WAMP INTERRUPT messages. More... | |
class | Invocation |
Contains payload arguments and other options within WAMP INVOCATION messages. More... | |
class | InvocationUnpacker |
Wrapper around a call slot which automatically unpacks positional payload arguments. More... | |
struct | Json |
JSON format tag type. More... | |
struct | KnownCodecIds |
IDs used by rawsocket transports to negotiate the serializer. More... | |
struct | Msgpack |
Msgpack format tag type. More... | |
struct | Null |
Type used to represent a null or empty Variant value. More... | |
class | Options |
Wrapper around a WAMP message containing an options dictionary. More... | |
class | Outcome |
Contains the outcome of an RPC invocation. More... | |
struct | OutputCategory |
Traits class that determines the category type that best matches the given output type. More... | |
class | Payload |
Wrapper around a WAMP message containing payload arguments and an options dictionary. More... | |
class | Procedure |
Contains the procedure URI and other options contained within WAMP REGISTER messages. More... | |
class | ProtocolCategory |
std::error_category used for reporting protocol errors related to invalid WAMP messages. More... | |
class | Pub |
Provides the topic URI, options, and payload contained within WAMP PUBLISH messages. More... | |
class | RawsockCategory |
std::error_category used for reporting errors specific to raw socket transports. More... | |
class | Realm |
Realm URI and other options contained within WAMP HELLO messages. More... | |
class | Reason |
Provides the reason URI and other options contained within GOODBYE messages. More... | |
class | Registration |
Represents a remote procedure registration. More... | |
class | Result |
Contains the remote procedure result options/payload within WAMP RESULT and YIELD messages. More... | |
class | Rpc |
Contains the procedure URI, options, and payload contained within WAMP CALL messages. More... | |
class | ScopedRegistration |
Limits a Registration's lifetime to a particular scope. More... | |
class | ScopedSubscription |
Limits a Subscription's lifetime to a particular scope. More... | |
class | Session |
Session API used by a client peer in WAMP applications. More... | |
class | SessionCategory |
std::error_category used for reporting errors at the WAMP session layer. More... | |
class | SessionInfo |
Session information contained within WAMP WELCOME messages. More... | |
class | SimpleCoroEventUnpacker |
Wrapper around an event slot which automatically unpacks positional payload arguments. More... | |
class | SimpleCoroInvocationUnpacker |
Wrapper around a call slot which automatically unpacks positional payload arguments. More... | |
class | SimpleEventUnpacker |
Wrapper around an event slot which automatically unpacks positional payload arguments. More... | |
class | SimpleInvocationUnpacker |
Wrapper around a call slot which automatically unpacks positional payload arguments. More... | |
struct | StreamInputCategory |
Input category for input streams of bytes. More... | |
struct | StreamOutputCategory |
Output category for output streams of bytes. More... | |
class | Subscription |
Represents a pub/sub event subscription. More... | |
class | TcpHost |
Contains TCP host address information, as well as other socket options. More... | |
class | TcpOptions |
Contains options for the TCP transport. More... | |
struct | ThreadSafe |
Tag type used to specify than an operation is to be dispatched via the called objects's execution strand. More... | |
class | Topic |
Provides the topic URI and other options contained within WAMP ‘SUBSCRIBE’ messages. More... | |
class | ToVariantConverter |
Wrapper around a destination Variant, used for conversions. More... | |
class | TransportCategory |
std::error_category used for reporting errors at the transport layer. More... | |
class | UdsOptions |
Contains options for the UNIX domain socket transport. More... | |
class | UdsPath |
Contains a Unix domain socket path, as well as other socket options. More... | |
class | Unexpected |
Minimalistic implementation of std::unexpected<std::error_code>. More... | |
struct | UnknownInputCategory |
Type used to indicate input category detection failed. More... | |
struct | UnknownOutputCategory |
Type used to indicate output category detection failed. More... | |
class | Variant |
Discriminated union container that represents a JSON value. More... | |
struct | Version |
Bundles the major, minor, and patch version numbers. More... | |
class | Visitor |
Convenience base class used to meet the result type requirements of a StaticVisitor. More... | |
Typedefs | |
using | AnyCompletionExecutor = boost::asio::any_completion_executor |
Type-erases an executor that is to be used with type-erased handlers. | |
template<typename TSignature > | |
using | AnyCompletionHandler = boost::asio::any_completion_handler< TSignature > |
Type-erases a one-shot (and possibly move-only) asynchronous completion handler. More... | |
using | AnyIoExecutor = boost::asio::any_io_executor |
Polymorphic executor for all I/O objects. | |
using | AnyExecutor = AnyIoExecutor |
Alias of AnyIoExecutor kept for backward compatibility. More... | |
using | AsioContext = boost::asio::io_context |
Queues and runs I/O completion handlers. | |
using | AsioService = AsioContext |
Alias of AsioContext kept for backward compatibility. More... | |
using | IoStrand = boost::asio::strand< AnyIoExecutor > |
Serializes I/O operations. | |
using | AsioErrorCode = boost::system::error_code |
Type used by Boost.Asio for reporting errors. | |
template<typename T > | |
using | AsyncResult = ErrorOr< T > |
using | CborStringEncoder = BasicCborEncoder< std::string > |
CBOR encoder type that encodes into a std::string. */. | |
using | CborBufferEncoder = BasicCborEncoder< MessageBuffer > |
CBOR encoder type that encodes into a MessageBuffer. */. | |
using | CborStreamEncoder = BasicCborEncoder< std::ostream > |
CBOR encoder type that encodes into a std::ostream. */. | |
using | CborStringDecoder = BasicCborDecoder< std::string > |
CBOR decoder type that decodes from a std::string. */. | |
using | CborBufferDecoder = BasicCborDecoder< MessageBuffer > |
CBOR decoder type that decodes from a MessageBuffer. */. | |
using | CborStreamDecoder = BasicCborDecoder< std::istream > |
CBOR decoder type that decodes from a std::istream. */. | |
template<typename O > | |
using | OutputCategoryTypeOf = typename OutputCategory< ValueTypeOf< O > >::type |
Yields the category type that best matches the given output type. | |
template<typename F , typename O , typename C = OutputCategoryTypeOf<O>> | |
using | Encoder = typename F::template Encoder< ValueTypeOf< O >, C > |
Yields the encoder type needed to encode a Variant to the given output type and output category. More... | |
template<typename I > | |
using | InputCategoryTypeOf = typename InputCategory< ValueTypeOf< I > >::type |
Yields the category type that best matches the given input type. | |
template<typename F , typename I , typename C = InputCategoryTypeOf<I>> | |
using | Decoder = typename F::template Decoder< ValueTypeOf< I >, C > |
Yields the decoder type needed to decode a Variant from the given input type and input category. More... | |
using | ConnectorList = std::vector< Connector::Ptr > |
List of Connector objects to use when attempting connection. | |
template<typename TSlot , typename... TArgs> | |
using | BasicCoroEventUnpacker = SimpleCoroEventUnpacker< TSlot, TArgs... > |
Alias to SimpleCoroEventUnpacker kept for backward compatibility. More... | |
template<typename TSlot , typename TResult , typename... TArgs> | |
using | BasicCoroInvocationUnpacker = SimpleCoroInvocationUnpacker< TSlot, TResult, TArgs... > |
Alias to SimpleCoroInvocationUnpacker kept for backward compability. More... | |
using | UnexpectedError = Unexpected< std::error_code > |
Type alias for Unexpected<std::error_code>. | |
template<typename T > | |
using | AsyncHandler = std::function< void(ErrorOr< T >)> |
Type alias for a handler taking an ErrorOr<T> parameter. | |
using | JsonStringEncoder = BasicJsonEncoder< std::string > |
JSON encoder type that encodes into a std::string. */. | |
using | JsonBufferEncoder = BasicJsonEncoder< MessageBuffer > |
JSON encoder type that encodes into a MessageBuffer. */. | |
using | JsonStreamEncoder = BasicJsonEncoder< std::ostream > |
JSON encoder type that encodes into a std::ostream. */. | |
using | JsonStringDecoder = BasicJsonDecoder< std::string > |
JSON decoder type that decodes from a std::string. */. | |
using | JsonBufferDecoder = BasicJsonDecoder< MessageBuffer > |
JSON decoder type that decodes from a MessageBuffer. */. | |
using | JsonStreamDecoder = BasicJsonDecoder< std::istream > |
JSON decoder type that decodes from a std::ostream. */. | |
using | MessageBuffer = std::vector< uint8_t > |
Container type used for encoded WAMP messages that are sent/received over a transport. | |
using | MsgpackStringEncoder = BasicMsgpackEncoder< std::string > |
Msgpack encoder type that encodes into a std::string. */. | |
using | MsgpackBufferEncoder = BasicMsgpackEncoder< MessageBuffer > |
Msgpack encoder type that encodes into a MessageBuffer. */. | |
using | MsgpackStreamEncoder = BasicMsgpackEncoder< std::ostream > |
Msgpack encoder type that encodes into a std::ostream. */. | |
using | MsgpackStringDecoder = BasicMsgpackDecoder< std::string > |
Msgpack decoder type that decodes from a std::string. */. | |
using | MsgpackBufferDecoder = BasicMsgpackDecoder< MessageBuffer > |
Msgpack decoder type that decodes from a MessageBuffer. */. | |
using | MsgpackStreamDecoder = BasicMsgpackDecoder< std::istream > |
Msgpack decoder type that decodes from a std::ostream. */. | |
using | Cancellation = CallCancellation |
Alias of CallCancellation kept for backward compatiblity. More... | |
template<bool B, typename T = int> | |
using | EnableIf = typename std::enable_if< B, T >::type |
Metafunction used to enable overloads based on a boolean condition. | |
template<bool B, typename T = int> | |
using | DisableIf = typename std::enable_if<!B, T >::type |
Metafunction used to disable overloads based on a boolean condition. | |
template<typename T > | |
using | ValueTypeOf = typename std::remove_cv< typename std::remove_reference< T >::type >::type |
Metafunction used to obtain the plain value type of a parameter passed by universal reference. | |
template<int N, typename... Ts> | |
using | NthTypeOf = typename std::tuple_element< N, std::tuple< Ts... > >::type |
Metafunction that obtains the Nth type of a parameter pack. | |
template<bool B> | |
using | BoolConstant = std::integral_constant< bool, B > |
Equivalent to std::bool_constant provided in C++17. | |
using | TrueType = BoolConstant< true > |
Equivalent to std::true_type provided in C++17. | |
using | FalseType = BoolConstant< false > |
Equivalent to std::false_type provided in C++17. | |
template<typename TSlot > | |
using | DecayedSlot = typename std::decay< TSlot >::type |
Metafunction that removes const/reference decorations off a slot type. | |
template<typename TSlot , typename... TArgs> | |
using | BasicEventUnpacker = SimpleEventUnpacker< TSlot, TArgs... > |
Alias to SimpleEventUnpacker kept for backward compatiblity. More... | |
template<typename TSlot , typename TResult , typename... TArgs> | |
using | BasicInvocationUnpacker = SimpleInvocationUnpacker< TSlot, TResult, TArgs... > |
Alias to SimpleInvocationUnpacker kept for backward compability. More... | |
using | SessionId = int64_t |
Ephemeral ID associated with a WAMP session. | |
using | RequestId = int64_t |
Ephemeral ID associated with a WAMP request. | |
using | SubscriptionId = int64_t |
Ephemeral ID associated with an topic subscription. | |
using | PublicationId = int64_t |
Ephemeral ID associated with an event publication. | |
using | RegistrationId = int64_t |
Obtains the value representing a blank RequestId. | |
using | CancelMode = CallCancelMode |
Alias to CallCancelMode kept for backward compatibility. More... | |
Functions | |
template<typename F , typename... Ts> | |
void | dispatchAny (F &&handler, Ts &&... args) |
Dispatches the given handler using its associated executor, passing the given arguments. | |
template<typename F , typename E , typename... Ts> | |
void | dispatchVia (const E &fallbackExec, F &&handler, Ts &&... args) |
Dispatches the given handler using the given fallback executor, passing the given arguments. | |
template<typename F , typename... Ts> | |
void | postAny (F &&handler, Ts &&... args) |
Posts the given handler using its associated executor, passing the given arguments. | |
template<typename F , typename E , typename... Ts> | |
void | postVia (const E &fallbackExec, F &&handler, Ts &&... args) |
Posts the given handler using the given fallback executor, passing the given arguments. | |
template<typename F , typename... Ts> | |
void | deferAny (F &&handler, Ts &&... args) |
Defers the given handler using its associated executor, passing the given arguments. | |
template<typename F , typename E , typename... Ts> | |
void | deferVia (const E &fallbackExec, F &&handler, Ts &&... args) |
Defers the given handler using the given fallback executor, passing the given arguments. | |
template<typename TFormat , typename TOutput > | |
void | encode (const Variant &variant, TOutput &&output) |
Encodes the given variant to the given byte container or stream. More... | |
template<typename TFormat , typename TInput > | |
std::error_code | decode (TInput &&input, Variant &variant) |
Decodes from the given byte sequence or stream to the given variant. More... | |
template<typename... TArgs, typename TSlot > | |
SimpleCoroEventUnpacker< DecayedSlot< TSlot >, TArgs... > | basicCoroEvent (TSlot &&slot) |
template<typename TResult , typename... TArgs, typename TSlot > | |
SimpleCoroInvocationUnpacker< DecayedSlot< TSlot >, TResult, TArgs... > | basicCoroRpc (TSlot &&slot) |
template<typename TErrorEnum > | |
UnexpectedError | makeUnexpectedError (TErrorEnum errc) |
Convenience function that creates an UnexpectedError from an error code enum. | |
template<typename T , typename U > | |
constexpr bool | isSameType () |
Determines if a type is the same as another. | |
template<typename T > | |
constexpr bool | isBool () |
Determines if the given type is considered a boolean. | |
template<typename T > | |
constexpr bool | isNumber () |
Determines if the given type is considered a number. More... | |
template<typename T > | |
constexpr bool | isSignedInteger () |
Determines if the given type is a signed integer. | |
template<typename T > | |
constexpr bool | isUnsignedInteger () |
Determines if the given type is an unsigned integer. | |
template<typename... TArgs, typename TSlot > | |
SimpleEventUnpacker< DecayedSlot< TSlot >, TArgs... > | basicEvent (TSlot &&slot) |
template<typename TResult , typename... TArgs, typename TSlot > | |
SimpleInvocationUnpacker< DecayedSlot< TSlot >, TResult, TArgs... > | basicRpc (TSlot &&slot) |
template<typename TConverter , typename TValue , DisableIf< std::is_enum< TValue >::value > = 0> | |
void | convert (TConverter &c, TValue &val) |
General function for converting custom types to/from Variant. More... | |
template<typename TEnum , EnableIf< std::is_enum< TEnum >::value > = 0> | |
void | convert (const FromVariantConverter &c, TEnum &e) |
Converts an integer variant to an enumerator. | |
template<typename TEnum , EnableIf< std::is_enum< TEnum >::value > = 0> | |
void | convert (ToVariantConverter &c, const TEnum &e) |
Converts an enumerator to an integer variant. | |
bool | lookupWampErrorUri (const std::string &uri, SessionErrc fallback, SessionErrc &result) |
template<typename T , std::size_t Size> | |
void | convert (FromVariantConverter &conv, std::array< T, Size > &array) |
Performs the conversion from an array variant to a std::array . More... | |
template<typename T , std::size_t Size> | |
void | convert (ToVariantConverter &conv, std::array< T, Size > &array) |
Performs the conversion from a std::array to an array variant. More... | |
template<typename T > | |
void | convert (FromVariantConverter &conv, boost::optional< T > &opt) |
Performs the conversion from a variant to a boost::optional. More... | |
template<typename T > | |
void | convert (ToVariantConverter &conv, boost::optional< T > &opt) |
Performs the conversion from a boost::optional to a variant. More... | |
template<typename T > | |
bool | operator== (const Variant &v, const boost::optional< T > o) |
Compares a variant and a boost::optional for equality. | |
template<typename T > | |
bool | operator== (const boost::optional< T > o, const Variant &v) |
Compares a variant and a boost::optional for equality. | |
template<typename T > | |
bool | operator!= (const Variant &v, const boost::optional< T > o) |
Compares a variant and a boost::optional for inequality. | |
template<typename T > | |
bool | operator!= (const boost::optional< T > o, const Variant &v) |
Compares a variant and a boost::optional for inequality. | |
template<typename T > | |
void | convert (FromVariantConverter &conv, std::optional< T > &opt) |
Performs the conversion from a variant to a std::optional. More... | |
template<typename T > | |
void | convert (ToVariantConverter &conv, std::optional< T > &opt) |
Performs the conversion from a std::optional to a variant. More... | |
template<typename T > | |
bool | operator== (const Variant &v, const std::optional< T > o) |
Compares a variant and a std::optional for equality. | |
template<typename T > | |
bool | operator== (const std::optional< T > o, const Variant &v) |
Compares a variant and a std::optional for equality. | |
template<typename T > | |
bool | operator!= (const Variant &v, const std::optional< T > o) |
Compares a variant and a std::optional for inequality. | |
template<typename T > | |
bool | operator!= (const std::optional< T > o, const Variant &v) |
Compares a variant and a std::optional for inequality. | |
template<typename T > | |
void | convert (FromVariantConverter &conv, std::set< T > &set) |
Performs the conversion from an array variant to a std::set . More... | |
template<typename T > | |
void | convert (ToVariantConverter &conv, std::set< T > &set) |
Performs the conversion from a std::set to an array variant. More... | |
template<typename... Ts> | |
void | toTuple (const wamp::Variant::Array &array, std::tuple< Ts... > &tuple) |
Converts a Variant::Array to a std::tuple . More... | |
template<typename... Ts> | |
wamp::Variant::Array | toArray (const std::tuple< Ts... > &tuple) |
Converts a std::tuple to a Variant::Array. More... | |
template<typename... Ts> | |
void | convert (FromVariantConverter &conv, std::tuple< Ts... > &tuple) |
Performs the conversion from an array variant to a std::tuple . More... | |
template<typename... Ts> | |
void | convert (ToVariantConverter &conv, std::tuple< Ts... > &tuple) |
Performs the conversion from a std::tuple to an array variant. More... | |
template<typename... Ts> | |
bool | operator== (const Array &array, const std::tuple< Ts... > &tuple) |
Compares a Variant::Array and a std::tuple for equality. | |
template<typename... Ts> | |
bool | operator== (const std::tuple< Ts... > &tuple, const Array &array) |
Compares a std::tuple and a Variant::Array for equality. | |
template<typename... Ts> | |
bool | operator!= (const Array &array, const std::tuple< Ts... > &tuple) |
Compares a Variant::Array and a std::tuple for inequality. | |
template<typename... Ts> | |
bool | operator!= (const std::tuple< Ts... > &tuple, const Array &array) |
Compares a std::tuple and a Variant::Array for inequality. | |
template<typename... Ts> | |
bool | operator== (const Variant &variant, const std::tuple< Ts... > &tuple) |
Compares a Variant and a std::tuple for equality. | |
template<typename... Ts> | |
bool | operator== (const std::tuple< Ts... > &tuple, const Variant &variant) |
Compares a std::tuple and a Variant for equality. | |
template<typename... Ts> | |
bool | operator!= (const Variant &variant, const std::tuple< Ts... > &tuple) |
Compares a Variant and a std::tuple for inequality. | |
template<typename... Ts> | |
bool | operator!= (const std::tuple< Ts... > &tuple, const Variant &variant) |
Compares a std::tuple and a Variant for inequality. | |
template<typename T > | |
void | convert (FromVariantConverter &conv, std::unordered_map< String, T > &map) |
Performs the conversion from an object variant to a std::unordered_map . More... | |
template<typename T > | |
void | convert (ToVariantConverter &conv, std::unordered_map< String, T > &map) |
Performs the conversion from a std::unordered_map to an object variant. More... | |
template<typename T > | |
void | convert (FromVariantConverter &conv, std::unordered_set< T > &set) |
Performs the conversion from an array variant to a std::unordered_set . More... | |
template<typename T > | |
void | convert (ToVariantConverter &conv, std::unordered_set< T > &set) |
Performs the conversion from a std::unordered_set to an array variant. More... | |
Variables | |
constexpr Null | null |
Constant Null object that can be assigned to, or compared with a Variant. | |
constexpr Deferment | deferment |
Convenient value of the wamp::Deferment tag type that can be passed to the wamp::Outcome constructor. | |
constexpr ThreadSafe | threadSafe |
Constant ThreadSafe object instance that can be passed to functions. | |
Namespace for all identifiers defined by the CppWAMP library.
struct wamp::ByteArrayInputCategory |
Input category for contiguous byte arrays which provide data
and size
member functions.
struct wamp::ByteContainerOutputCategory |
Output category for containers of bytes which provide push_back
and insert
member functions.
struct wamp::InputCategory |
Traits class that determines the category type that best matches the given input type.
struct wamp::OutputCategory |
Traits class that determines the category type that best matches the given output type.
struct wamp::StreamInputCategory |
Input category for input streams of bytes.
struct wamp::StreamOutputCategory |
Output category for output streams of bytes.
struct wamp::UnknownInputCategory |
Type used to indicate input category detection failed.
struct wamp::UnknownOutputCategory |
Type used to indicate output category detection failed.
class wamp::Visitor |
Convenience base class used to meet the result type requirements of a StaticVisitor.
Class Members | ||
---|---|---|
typedef TResult | Result | The return type for all of the visitor's dispatch functions. |
using wamp::AnyCompletionHandler = typedef boost::asio::any_completion_handler<TSignature> |
Type-erases a one-shot (and possibly move-only) asynchronous completion handler.
The executor associated with the type-erased handler can be obtained via boost::asio::get_associated_executor.
using wamp::AnyExecutor = typedef AnyIoExecutor |
Alias of AnyIoExecutor kept for backward compatibility.
using wamp::AsioService = typedef AsioContext |
Alias of AsioContext kept for backward compatibility.
using wamp::AsyncResult = typedef ErrorOr<T> |
using wamp::Encoder = typedef typename F::template Encoder<ValueTypeOf<O>, C> |
Yields the encoder type needed to encode a Variant to the given output type and output category.
F | Encoder format type tag (e.g. Json) |
O | Output type (e.g. std::string) |
C | Output category (deduced) |
using wamp::Decoder = typedef typename F::template Decoder<ValueTypeOf<I>, C> |
Yields the decoder type needed to decode a Variant from the given input type and input category.
F | Encoder format type tag (e.g. Json) |
I | Input type (e.g. std::string) |
I | Input category (deduced) |
using wamp::BasicCoroEventUnpacker = typedef SimpleCoroEventUnpacker<TSlot, TArgs...> |
Alias to SimpleCoroEventUnpacker kept for backward compatibility.
using wamp::BasicCoroInvocationUnpacker = typedef SimpleCoroInvocationUnpacker<TSlot, TResult, TArgs...> |
Alias to SimpleCoroInvocationUnpacker kept for backward compability.
using wamp::Cancellation = typedef CallCancellation |
Alias of CallCancellation kept for backward compatiblity.
using wamp::BasicEventUnpacker = typedef SimpleEventUnpacker<TSlot, TArgs...> |
Alias to SimpleEventUnpacker kept for backward compatiblity.
using wamp::BasicInvocationUnpacker = typedef SimpleInvocationUnpacker<TSlot, TResult, TArgs...> |
Alias to SimpleInvocationUnpacker kept for backward compability.
using wamp::CancelMode = typedef CallCancelMode |
Alias to CallCancelMode kept for backward compatibility.
|
strong |
Error code values used with the SessionCategory error category.
The equivalencies between these codes are as follows:
std::error_code | Equivalent condition value |
---|---|
make_error_code(noSuchRealm) | joinError |
make_error_code(noSuchRole) | joinError |
make_error_code(systemShutdown) | sessionEndedByPeer |
make_error_code(closeRealm) | sessionEndedByPeer |
make_error_code(noSuchSubscription) | unsubscribeError |
make_error_code(procedureAlreadyExists) | registerError |
make_error_code(noSuchProcedure) | callError |
make_error_code(invalidArgument) | callError |
Enumerator | |
---|---|
success | Operation successful. |
sessionEnded | Operation aborted; session ended by this peer. |
sessionEndedByPeer | Session ended by other peer. |
allTransportsFailed | All transports failed during connection. |
joinError | Join error reported by router. |
publishError | Publish error reported by broker. |
subscribeError | Subscribe error reported by broker. |
unsubscribeError | Unsubscribe error reported by broker. |
registerError | Register error reported by dealer. |
unregisterError | Unregister error reported by dealer. |
callError | Call error reported by callee or dealer. |
invalidState | Invalid state for this operation. |
invalidUri | An invalid WAMP URI was provided. |
noSuchProcedure | No procedure was registered under the given URI. |
procedureAlreadyExists | A procedure with the given URI is already registered. |
noSuchRegistration | Could not unregister; the given registration is not active. |
noSuchSubscription | Could not unsubscribe; the given subscription is not active. |
invalidArgument | The given argument types/values are not acceptable to the called procedure. |
systemShutdown | The other peer is shutting down. |
closeRealm | The other peer is leaving the realm. |
goodbyeAndOut | Session ended successfully. |
notAuthorized | This peer is not authorized to perform the operation. |
authorizationFailed | The authorization operation failed. |
noSuchRealm | Attempt to join non-existent realm. |
noSuchRole | Attempt to authenticate under unsupported role. |
cancelled | A previously issued call was cancelled. |
optionNotAllowed | Option is disallowed by the router. |
noEligibleCallee | Call options lead to the exclusion of all callees providing the procedure. |
discloseMeDisallowed | Router rejected client request to disclose its identity. |
networkFailure | Router encountered a network failure. |
|
strong |
Error code values used with the DecodingCategory error category.
All of the following non-zero codes are equivalent to the DecodingErrc::failure condition:
jsoncons::json_errc
jsoncons::cbor::cbor_errc
jsoncons::msgpack::msgpack_errc
|
strong |
Error code values used with the ProtocolCategory error category.
All of the following non-zero codes are equivalent to the ProtocolErrc::badDecode condition:
jsoncons::json_errc
jsoncons::cbor::cbor_errc
jsoncons::msgpack::msgpack_errc
Enumerator | |
---|---|
success | Operation successful. |
badDecode | Error decoding WAMP message payload. |
badSchema | Invalid WAMP message schema. |
unsupportedMsg | Received unsupported WAMP message. |
unexpectedMsg | Received unexpected WAMP message. |
|
strong |
Error code values used with the TransportCategory error category.
Enumerator | |
---|---|
success | Operation successful. |
aborted | Operation aborted. |
failed | Operation failed. |
badTxLength | Outgoing message exceeds maximum length. |
badRxLength | Incoming message exceeds maximum length. |
|
strong |
Error code values used with the RawsockCategory error category.
|
strong |
Enumerators used to specify the maximum length of messages that a raw socket transport can receive.
|
strong |
Integer ID used to indicate the current dynamic type of a Variant
.
Enumerator | |
---|---|
null | For Variant::Null. |
boolean | For Variant::Bool. |
integer | For Variant::Int. |
uint | For Variant::UInt. |
real | For Variant::Real. |
string | For Variant::String. |
blob | For Variant::Blob. |
array | For Variant::Array. |
object | For Variant::Object. |
|
strong |
Enumerates the possible states that a client or router session can be in.
|
strong |
void wamp::encode | ( | const Variant & | variant, |
TOutput && | output | ||
) |
Encodes the given variant to the given byte container or stream.
By design, the output is not cleared before encoding. The encoder is instantiated once and then discarded.
TFormat | The codec format tag (e.g. Json) |
TOutput | The output type (deduced) |
std::error_code wamp::decode | ( | TInput && | input, |
Variant & | variant | ||
) |
Decodes from the given byte sequence or stream to the given variant.
The decoder is instantiated once and then discarded.
TFormat | The codec format tag (e.g. Json) |
TInput | The input type (deduced) |
SimpleCoroEventUnpacker< DecayedSlot< TSlot >, TArgs... > wamp::basicCoroEvent | ( | TSlot && | slot | ) |
SimpleCoroInvocationUnpacker< DecayedSlot< TSlot >, TResult, TArgs... > wamp::basicCoroRpc | ( | TSlot && | slot | ) |
|
constexpr |
Determines if the given type is considered a number.
SimpleEventUnpacker< DecayedSlot< TSlot >, TArgs... > wamp::basicEvent | ( | TSlot && | slot | ) |
SimpleInvocationUnpacker< DecayedSlot< TSlot >, TResult, TArgs... > wamp::basicRpc | ( | TSlot && | slot | ) |
|
inline |
General function for converting custom types to/from Variant.
You must overload this function for custom types that you want to be convertible to/from Variant. Alternatively, you may also:
convert
member function within your custom type,convertTo
and convertFrom
free functions, or,convertTo
and convertFrom
member functions.
|
related |
uri | The URI to search under. | |
fallback | Defaul value to used if the URI was not found. | |
[out] | result | [out] The error code corresponding to the given URI, or the given fallback value if not found |
void wamp::convert | ( | FromVariantConverter & | conv, |
std::array< T, Size > & | array | ||
) |
Performs the conversion from an array variant to a std::array
.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
std::array< T, Size > & | array | ||
) |
Performs the conversion from a std::array
to an array variant.
Users should not use this function directly. Use Variant::from instead.
void wamp::convert | ( | FromVariantConverter & | conv, |
boost::optional< T > & | opt | ||
) |
Performs the conversion from a variant to a boost::optional.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
boost::optional< T > & | opt | ||
) |
Performs the conversion from a boost::optional to a variant.
Users should not use this function directly. Use Variant::from instead.
void wamp::convert | ( | FromVariantConverter & | conv, |
std::optional< T > & | opt | ||
) |
Performs the conversion from a variant to a std::optional.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
std::optional< T > & | opt | ||
) |
Performs the conversion from a std::optional to a variant.
Users should not use this function directly. Use Variant::from instead.
void wamp::convert | ( | FromVariantConverter & | conv, |
std::set< T > & | set | ||
) |
Performs the conversion from an array variant to a std::set
.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
std::set< T > & | set | ||
) |
Performs the conversion from a std::set
to an array variant.
Users should not use this function directly. Use Variant::from instead.
void wamp::toTuple | ( | const wamp::Variant::Array & | array, |
std::tuple< Ts... > & | tuple | ||
) |
Converts a Variant::Array to a std::tuple
.
error::Conversion | if one of the Array element types is not convertible to the target type. |
wamp::Variant::Array wamp::toArray | ( | const std::tuple< Ts... > & | tuple | ) |
Converts a std::tuple
to a Variant::Array.
void wamp::convert | ( | FromVariantConverter & | conv, |
std::tuple< Ts... > & | tuple | ||
) |
Performs the conversion from an array variant to a std::tuple
.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
std::tuple< Ts... > & | tuple | ||
) |
Performs the conversion from a std::tuple
to an array variant.
Users should not use this function directly. Use Variant::from instead.
void wamp::convert | ( | FromVariantConverter & | conv, |
std::unordered_map< String, T > & | map | ||
) |
Performs the conversion from an object variant to a std::unordered_map
.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
std::unordered_map< String, T > & | map | ||
) |
Performs the conversion from a std::unordered_map
to an object variant.
Users should not use this function directly. Use Variant::from instead.
void wamp::convert | ( | FromVariantConverter & | conv, |
std::unordered_set< T > & | set | ||
) |
Performs the conversion from an array variant to a std::unordered_set
.
Users should not use this function directly. Use Variant::to instead.
void wamp::convert | ( | ToVariantConverter & | conv, |
std::unordered_set< T > & | set | ||
) |
Performs the conversion from a std::unordered_set
to an array variant.
Users should not use this function directly. Use Variant::from instead.