moved instantiate_connection to aux namespace
This commit is contained in:
parent
3b0ce8d2e1
commit
6c4869f044
|
@ -75,7 +75,6 @@ set(libtorrent_include_files
|
||||||
http_tracker_connection
|
http_tracker_connection
|
||||||
i2p_stream
|
i2p_stream
|
||||||
identify_client
|
identify_client
|
||||||
instantiate_connection
|
|
||||||
invariant_check
|
invariant_check
|
||||||
io
|
io
|
||||||
io_service
|
io_service
|
||||||
|
@ -226,6 +225,7 @@ set(libtorrent_aux_include_files
|
||||||
ffs
|
ffs
|
||||||
file_progress
|
file_progress
|
||||||
has_block
|
has_block
|
||||||
|
instantiate_connection
|
||||||
io
|
io
|
||||||
ip_notifier
|
ip_notifier
|
||||||
listen_socket_handle
|
listen_socket_handle
|
||||||
|
|
|
@ -63,7 +63,6 @@ nobase_include_HEADERS = \
|
||||||
http_tracker_connection.hpp \
|
http_tracker_connection.hpp \
|
||||||
i2p_stream.hpp \
|
i2p_stream.hpp \
|
||||||
identify_client.hpp \
|
identify_client.hpp \
|
||||||
instantiate_connection.hpp \
|
|
||||||
invariant_check.hpp \
|
invariant_check.hpp \
|
||||||
io.hpp \
|
io.hpp \
|
||||||
io_service.hpp \
|
io_service.hpp \
|
||||||
|
@ -215,6 +214,7 @@ nobase_include_HEADERS = \
|
||||||
aux_/ip_notifier.hpp \
|
aux_/ip_notifier.hpp \
|
||||||
aux_/noexcept_movable.hpp \
|
aux_/noexcept_movable.hpp \
|
||||||
aux_/torrent_impl.hpp \
|
aux_/torrent_impl.hpp \
|
||||||
|
aux_/instantiate_connection.hpp \
|
||||||
\
|
\
|
||||||
extensions/smart_ban.hpp \
|
extensions/smart_ban.hpp \
|
||||||
extensions/ut_metadata.hpp \
|
extensions/ut_metadata.hpp \
|
||||||
|
|
|
@ -37,14 +37,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
namespace libtorrent {
|
namespace libtorrent {
|
||||||
|
|
||||||
namespace aux {
|
|
||||||
|
|
||||||
struct proxy_settings;
|
|
||||||
struct socket_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct utp_socket_manager;
|
struct utp_socket_manager;
|
||||||
|
|
||||||
|
namespace aux {
|
||||||
|
|
||||||
// instantiate a socket_type (s) according to the specified criteria
|
// instantiate a socket_type (s) according to the specified criteria
|
||||||
TORRENT_EXTRA_EXPORT bool instantiate_connection(io_service& ios
|
TORRENT_EXTRA_EXPORT bool instantiate_connection(io_service& ios
|
||||||
, aux::proxy_settings const& ps, aux::socket_type& s
|
, aux::proxy_settings const& ps, aux::socket_type& s
|
||||||
|
@ -52,6 +48,6 @@ namespace libtorrent {
|
||||||
, utp_socket_manager* sm
|
, utp_socket_manager* sm
|
||||||
, bool peer_connection
|
, bool peer_connection
|
||||||
, bool tracker_connection);
|
, bool tracker_connection);
|
||||||
}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "libtorrent/http_connection.hpp"
|
#include "libtorrent/http_connection.hpp"
|
||||||
#include "libtorrent/aux_/escape_string.hpp"
|
#include "libtorrent/aux_/escape_string.hpp"
|
||||||
#include "libtorrent/instantiate_connection.hpp"
|
#include "libtorrent/aux_/instantiate_connection.hpp"
|
||||||
#include "libtorrent/gzip.hpp"
|
#include "libtorrent/gzip.hpp"
|
||||||
#include "libtorrent/parse_url.hpp"
|
#include "libtorrent/parse_url.hpp"
|
||||||
#include "libtorrent/socket.hpp"
|
#include "libtorrent/socket.hpp"
|
||||||
|
|
|
@ -33,12 +33,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "libtorrent/socket.hpp"
|
#include "libtorrent/socket.hpp"
|
||||||
#include "libtorrent/aux_/socket_type.hpp"
|
#include "libtorrent/aux_/socket_type.hpp"
|
||||||
#include "libtorrent/utp_socket_manager.hpp"
|
#include "libtorrent/utp_socket_manager.hpp"
|
||||||
#include "libtorrent/instantiate_connection.hpp"
|
#include "libtorrent/aux_/instantiate_connection.hpp"
|
||||||
|
|
||||||
namespace libtorrent {
|
namespace libtorrent { namespace aux {
|
||||||
|
|
||||||
// TODO: 2 peer_connection and tracker_connection should probably be flags
|
// TODO: 2 peer_connection and tracker_connection should probably be flags
|
||||||
// TODO: 2 move this function into libtorrent::aux namespace
|
|
||||||
bool instantiate_connection(io_service& ios
|
bool instantiate_connection(io_service& ios
|
||||||
, aux::proxy_settings const& ps, aux::socket_type& s
|
, aux::proxy_settings const& ps, aux::socket_type& s
|
||||||
, void* ssl_context
|
, void* ssl_context
|
||||||
|
@ -143,4 +142,4 @@ namespace libtorrent {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}}
|
||||||
|
|
|
@ -74,7 +74,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "libtorrent/upnp.hpp"
|
#include "libtorrent/upnp.hpp"
|
||||||
#include "libtorrent/natpmp.hpp"
|
#include "libtorrent/natpmp.hpp"
|
||||||
#include "libtorrent/lsd.hpp"
|
#include "libtorrent/lsd.hpp"
|
||||||
#include "libtorrent/instantiate_connection.hpp"
|
#include "libtorrent/aux_/instantiate_connection.hpp"
|
||||||
#include "libtorrent/peer_info.hpp"
|
#include "libtorrent/peer_info.hpp"
|
||||||
#include "libtorrent/random.hpp"
|
#include "libtorrent/random.hpp"
|
||||||
#include "libtorrent/magnet_uri.hpp"
|
#include "libtorrent/magnet_uri.hpp"
|
||||||
|
|
|
@ -72,7 +72,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "libtorrent/alert_types.hpp"
|
#include "libtorrent/alert_types.hpp"
|
||||||
#include "libtorrent/extensions.hpp"
|
#include "libtorrent/extensions.hpp"
|
||||||
#include "libtorrent/aux_/session_interface.hpp"
|
#include "libtorrent/aux_/session_interface.hpp"
|
||||||
#include "libtorrent/instantiate_connection.hpp"
|
#include "libtorrent/aux_/instantiate_connection.hpp"
|
||||||
#include "libtorrent/assert.hpp"
|
#include "libtorrent/assert.hpp"
|
||||||
#include "libtorrent/broadcast_socket.hpp"
|
#include "libtorrent/broadcast_socket.hpp"
|
||||||
#include "libtorrent/kademlia/dht_tracker.hpp"
|
#include "libtorrent/kademlia/dht_tracker.hpp"
|
||||||
|
|
|
@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "libtorrent/utp_stream.hpp"
|
#include "libtorrent/utp_stream.hpp"
|
||||||
#include "libtorrent/udp_socket.hpp"
|
#include "libtorrent/udp_socket.hpp"
|
||||||
#include "libtorrent/utp_socket_manager.hpp"
|
#include "libtorrent/utp_socket_manager.hpp"
|
||||||
#include "libtorrent/instantiate_connection.hpp"
|
#include "libtorrent/aux_/instantiate_connection.hpp"
|
||||||
#include "libtorrent/socket_io.hpp"
|
#include "libtorrent/socket_io.hpp"
|
||||||
#include "libtorrent/socket.hpp" // for TORRENT_HAS_DONT_FRAGMENT
|
#include "libtorrent/socket.hpp" // for TORRENT_HAS_DONT_FRAGMENT
|
||||||
#include "libtorrent/broadcast_socket.hpp" // for is_teredo
|
#include "libtorrent/broadcast_socket.hpp" // for is_teredo
|
||||||
|
@ -46,8 +46,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
namespace libtorrent {
|
namespace libtorrent {
|
||||||
|
|
||||||
using namespace libtorrent::aux;
|
|
||||||
|
|
||||||
utp_socket_manager::utp_socket_manager(
|
utp_socket_manager::utp_socket_manager(
|
||||||
send_fun_t const& send_fun
|
send_fun_t const& send_fun
|
||||||
, incoming_utp_callback_t const& cb
|
, incoming_utp_callback_t const& cb
|
||||||
|
@ -216,7 +214,7 @@ namespace libtorrent {
|
||||||
// create the new socket with this ID
|
// create the new socket with this ID
|
||||||
m_new_connection = id;
|
m_new_connection = id;
|
||||||
|
|
||||||
instantiate_connection(m_ios, aux::proxy_settings(), *c
|
aux::instantiate_connection(m_ios, aux::proxy_settings(), *c
|
||||||
, m_ssl_context, this, true, false);
|
, m_ssl_context, this, true, false);
|
||||||
|
|
||||||
utp_stream* str = nullptr;
|
utp_stream* str = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue