mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-18 18:15:50 +00:00
Use MultiSocket and strand in Peer
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
// in Peer code if you suspect you're having problems because of it.
|
||||
//
|
||||
#ifndef RIPPLE_PEER_USES_BEAST_MULTISOCKET
|
||||
#define RIPPLE_PEER_USES_BEAST_MULTISOCKET 0
|
||||
#define RIPPLE_PEER_USES_BEAST_MULTISOCKET 1
|
||||
#endif
|
||||
|
||||
// Here temporarily to turn off new Validations code while it
|
||||
|
||||
@@ -34,7 +34,8 @@ public:
|
||||
|
||||
#if RIPPLE_PEER_USES_BEAST_MULTISOCKET
|
||||
ScopedPointer <MultiSocket> m_socket;
|
||||
boost::asio::io_service& m_strand;
|
||||
//boost::asio::io_service& m_strand;
|
||||
boost::asio::io_service::strand m_strand;
|
||||
|
||||
NativeSocketType& getNativeSocket ()
|
||||
{
|
||||
|
||||
@@ -598,7 +598,7 @@ protected:
|
||||
Socket* new_ssl_stream ()
|
||||
{
|
||||
typedef typename boost::asio::ssl::stream <next_layer_type&> SslStream;
|
||||
typedef SocketWrapperStrand <SslStream> Wrapper;
|
||||
typedef SocketWrapper <SslStream> Wrapper;
|
||||
Wrapper* const socket = new Wrapper (m_next_layer, m_ssl_context);
|
||||
set_ssl_stream (socket->this_layer ());
|
||||
return socket;
|
||||
@@ -614,7 +614,7 @@ protected:
|
||||
{
|
||||
typedef boost::asio::ssl::stream <
|
||||
PrefilledReadStream <next_layer_type&> > SslStream;
|
||||
typedef SocketWrapperStrand <SslStream> Wrapper;
|
||||
typedef SocketWrapper <SslStream> Wrapper;
|
||||
Wrapper* const socket = new Wrapper (m_next_layer, m_ssl_context);
|
||||
socket->this_layer ().next_layer().fill (buffers);
|
||||
set_ssl_stream (socket->this_layer ());
|
||||
|
||||
Reference in New Issue
Block a user