예제 #1
0
inline wamp_abort_message::wamp_abort_message(msgpack::zone&& zone)
    : wamp_message(std::move(zone))
    , m_type(wamp_message_type::ABORT)
    , m_details(msgpack_empty_map())
    , m_reason()
{
}
예제 #2
0
inline wamp_hello_message::wamp_hello_message(msgpack::zone&& zone)
    : wamp_message(std::move(zone))
    , m_type(wamp_message_type::HELLO)
    , m_realm()
    , m_details(msgpack_empty_map())
{
}
예제 #3
0
inline wamp_welcome_message::wamp_welcome_message(msgpack::zone&& zone)
    : wamp_message(std::move(zone))
    , m_type(wamp_message_type::WELCOME)
    , m_session_id()
    , m_details(msgpack_empty_map())
{
}
예제 #4
0
inline wamp_event_message::wamp_event_message()
    : m_type(wamp_message_type::EVENT)
    , m_subscription_id()
    , m_publication_id()
    , m_details(msgpack_empty_map())
    , m_arguments()
    , m_arguments_kw()
{
}
예제 #5
0
inline wamp_publish_message::wamp_publish_message(msgpack::zone&& zone)
    : wamp_message(std::move(zone))
    , m_type(wamp_message_type::PUBLISH)
    , m_request_id()
    , m_options(msgpack_empty_map())
    , m_topic()
    , m_arguments()
    , m_arguments_kw()
{
}
예제 #6
0
inline std::vector<msgpack::object> wamp_publish_message::marshal() const
{
    std::vector<msgpack::object> fields;

    if (!m_arguments_kw.is_nil()) {
        if (!m_arguments.is_nil()) {
            fields = { m_type, m_request_id, m_options, m_topic, m_arguments, m_arguments_kw };
        } else {
            fields = { m_type, m_request_id, m_options, m_topic, msgpack_empty_map(), m_arguments_kw };
        }
    } else if (!m_arguments.is_nil()) {
        fields = { m_type, m_request_id, m_options, m_topic, m_arguments };
    } else {
        fields = { m_type, m_request_id, m_options, m_topic };
    }

    return fields;
}
예제 #7
0
inline std::vector<msgpack::object> wamp_event_message::marshal() const
{
    std::vector<msgpack::object> fields;

    if (!m_arguments_kw.is_nil()) {
        if (!m_arguments.is_nil()) {
            fields = { m_type, m_subscription_id, m_publication_id, m_details,
                    m_arguments, m_arguments_kw };
        } else {
            fields = { m_type, m_subscription_id, m_publication_id, m_details,
                    msgpack_empty_map(), m_arguments_kw };
        }
    } else if (!m_arguments.is_nil()) {
        fields = { m_type, m_subscription_id, m_publication_id, m_details, m_arguments };
    } else {
        fields = { m_type, m_subscription_id, m_publication_id, m_details };
    }

    return fields;
}