Remove unnecessary peer_address_ member from the connection handler.
This commit is contained in:
parent
504a4632a0
commit
ed18eb27a3
@ -235,18 +235,16 @@ public:
|
|||||||
peer.set_impl(sock.release());
|
peer.set_impl(sock.release());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Stream_Socket_Service, typename Address, typename Handler>
|
template <typename Stream_Socket_Service, typename Handler>
|
||||||
class connect_handler
|
class connect_handler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
connect_handler(impl_type impl, socket_type new_socket, Demuxer& demuxer,
|
connect_handler(impl_type impl, socket_type new_socket, Demuxer& demuxer,
|
||||||
basic_stream_socket<Stream_Socket_Service>& peer,
|
basic_stream_socket<Stream_Socket_Service>& peer, Handler handler)
|
||||||
const Address& peer_address, Handler handler)
|
|
||||||
: impl_(impl),
|
: impl_(impl),
|
||||||
new_socket_(new_socket),
|
new_socket_(new_socket),
|
||||||
demuxer_(demuxer),
|
demuxer_(demuxer),
|
||||||
peer_(peer),
|
peer_(peer),
|
||||||
peer_address_(peer_address),
|
|
||||||
handler_(handler)
|
handler_(handler)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -310,7 +308,6 @@ public:
|
|||||||
socket_type new_socket_;
|
socket_type new_socket_;
|
||||||
Demuxer& demuxer_;
|
Demuxer& demuxer_;
|
||||||
basic_stream_socket<Stream_Socket_Service>& peer_;
|
basic_stream_socket<Stream_Socket_Service>& peer_;
|
||||||
Address peer_address_;
|
|
||||||
Handler handler_;
|
Handler handler_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -388,8 +385,8 @@ public:
|
|||||||
impl->add_socket(new_socket.get());
|
impl->add_socket(new_socket.get());
|
||||||
demuxer_.work_started();
|
demuxer_.work_started();
|
||||||
reactor_.start_write_op(new_socket.get(),
|
reactor_.start_write_op(new_socket.get(),
|
||||||
connect_handler<Stream_Socket_Service, Address, Handler>(
|
connect_handler<Stream_Socket_Service, Handler>(
|
||||||
impl, new_socket.get(), demuxer_, peer, peer_address, handler));
|
impl, new_socket.get(), demuxer_, peer, handler));
|
||||||
new_socket.release();
|
new_socket.release();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user