99#include < muduo/net/protorpc/RpcCodec.h>
1010#include < muduo/net/protorpc/rpc.pb.h>
1111
12- #include < boost/bind.hpp>
1312#include < boost/ptr_container/ptr_vector.hpp>
1413
1514#include < endian.h>
@@ -70,20 +69,20 @@ struct RawMessage
7069 const void * loc_;
7170};
7271
73- class BackendSession : boost:: noncopyable
72+ class BackendSession : noncopyable
7473{
7574 public:
7675 BackendSession (EventLoop* loop, const InetAddress& backendAddr, const string& name)
7776 : loop_(loop),
7877 client_ (loop, backendAddr, name),
79- codec_(boost ::bind(&BackendSession::onRpcMessage, this , _1, _2, _3),
80- boost ::bind(&BackendSession::onRawMessage, this , _1, _2, _3)),
78+ codec_(std ::bind(&BackendSession::onRpcMessage, this , _1, _2, _3),
79+ std ::bind(&BackendSession::onRawMessage, this , _1, _2, _3)),
8180 nextId_(0 )
8281 {
8382 client_.setConnectionCallback (
84- boost ::bind (&BackendSession::onConnection, this , _1));
83+ std ::bind (&BackendSession::onConnection, this , _1));
8584 client_.setMessageCallback (
86- boost ::bind (&RpcCodec::onMessage, &codec_, _1, _2, _3));
85+ std ::bind (&RpcCodec::onMessage, &codec_, _1, _2, _3));
8786 client_.enableRetry ();
8887 }
8988
@@ -192,7 +191,7 @@ class BackendSession : boost::noncopyable
192191 struct Request
193192 {
194193 uint64_t origId;
195- boost ::weak_ptr<TcpConnection> clientConn;
194+ std ::weak_ptr<TcpConnection> clientConn;
196195 };
197196
198197 EventLoop* loop_;
@@ -203,7 +202,7 @@ class BackendSession : boost::noncopyable
203202 std::map<uint64_t , Request> outstandings_;
204203};
205204
206- class Balancer : boost:: noncopyable
205+ class Balancer : noncopyable
207206{
208207 public:
209208 Balancer (EventLoop* loop,
@@ -212,16 +211,16 @@ class Balancer : boost::noncopyable
212211 const std::vector<InetAddress>& backends)
213212 : loop_(loop),
214213 server_ (loop, listenAddr, name),
215- codec_(boost ::bind(&Balancer::onRpcMessage, this , _1, _2, _3),
216- boost ::bind(&Balancer::onRawMessage, this , _1, _2, _3)),
214+ codec_(std ::bind(&Balancer::onRpcMessage, this , _1, _2, _3),
215+ std ::bind(&Balancer::onRawMessage, this , _1, _2, _3)),
217216 backends_(backends)
218217 {
219218 server_.setThreadInitCallback (
220- boost ::bind (&Balancer::initPerThread, this , _1));
219+ std ::bind (&Balancer::initPerThread, this , _1));
221220 server_.setConnectionCallback (
222- boost ::bind (&Balancer::onConnection, this , _1));
221+ std ::bind (&Balancer::onConnection, this , _1));
223222 server_.setMessageCallback (
224- boost ::bind (&RpcCodec::onMessage, &codec_, _1, _2, _3));
223+ std ::bind (&RpcCodec::onMessage, &codec_, _1, _2, _3));
225224 }
226225
227226 ~Balancer ()
0 commit comments