// 读请求 void SSLSession::read() { IMessage* req = CreateRequest(); int size = req->GetMsgHeaderSize(); boost::asio::async_read(shared_from_this()->socket, boost::asio::buffer(req->GetMsgHeader(), req->GetMsgHeaderSize()), boost::asio::transfer_all(), strand.wrap( boost::bind(&SSLSession::OnReadHead, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred, req) ) ); }
// 读请求 void SSLSession::read() { IMessage* req = create_request(); boost::asio::async_read(socket_, boost::asio::buffer(req->GetMsgHeader(), req->GetMsgHeaderSize()), boost::asio::transfer_all(), strand_.wrap( boost::bind(&SSLSession::handle_read_head, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred, req) ) ); }