Esempio n. 1
0
    virtual
    void
    operator()(const msgpack::object& unpacked, const api::stream_ptr_t& upstream) {
        this->call(unpacked);

        // This is needed so that service clients could detect operation completion.
        upstream->close();
    }
Esempio n. 2
0
    virtual
    void
    operator()(const msgpack::object& unpacked, const api::stream_ptr_t& upstream) {
        type_traits<R>::pack(m_packer, this->call(unpacked));

        upstream->write(m_buffer.data(), m_buffer.size());
        upstream->close();

        m_buffer.clear();
    }
Esempio n. 3
0
    virtual
    std::shared_ptr<dispatch_t>
    operator()(const msgpack::object& unpacked, const api::stream_ptr_t& upstream) {
        this->call(unpacked);

        // This is needed so that service clients could detect operation completion.
        upstream->close();

        // Return an empty protocol dispatch.
        return std::shared_ptr<dispatch_t>();
    }
Esempio n. 4
0
    virtual
    std::shared_ptr<dispatch_t>
    operator()(const msgpack::object& unpacked, const api::stream_ptr_t& upstream) {
        type_traits<R>::pack(m_packer, this->call(unpacked));

        upstream->write(m_buffer.data(), m_buffer.size());
        upstream->close();

        m_buffer.clear();

        // Return an empty protocol dispatch.
        return std::shared_ptr<dispatch_t>();
    }