From 28c32cf3cf1ee8e31ebe8d7eec4e843b5026d15d Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Wed, 28 Dec 2011 08:58:10 -0600 Subject: [PATCH] send a scatter gather buffer list instead of string --- src/connection.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/connection.hpp b/src/connection.hpp index 4a7584c434..48f18382e7 100644 --- a/src/connection.hpp +++ b/src/connection.hpp @@ -552,9 +552,13 @@ protected: m_write_state = WRITING; } + std::vector data; + + data.push_back(boost::asio::buffer(*m_write_queue.front())); + boost::asio::async_write( socket_type::get_socket(), - boost::asio::buffer(*m_write_queue.front()), + data, boost::bind( &type::handle_write, type::shared_from_this(),