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(); }
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>(); }