mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
move includes around to lessen overall load
This commit is contained in:
parent
38ecd0526e
commit
09ce03d612
73 changed files with 212 additions and 161 deletions
|
@ -50,6 +50,7 @@
|
|||
#include "http_auth.h"
|
||||
#include "to_nonconst_iterator.h"
|
||||
#include "net_parse_helpers.h"
|
||||
#include "syncobj.h"
|
||||
|
||||
//#include "shlwapi.h"
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ namespace epee
|
|||
virtual ~i_sub_handler(){}
|
||||
|
||||
virtual bool update_in( std::string& piece_of_transfer)=0;
|
||||
virtual void stop(std::string& OUT collect_remains)=0;
|
||||
virtual bool update_and_stop(std::string& OUT collect_remains, bool& is_changed)
|
||||
virtual void stop(std::string& collect_remains)=0;
|
||||
virtual bool update_and_stop(std::string& collect_remains, bool& is_changed)
|
||||
{
|
||||
is_changed = true;
|
||||
bool res = this->update_in(collect_remains);
|
||||
|
@ -66,7 +66,7 @@ namespace epee
|
|||
{
|
||||
return m_powner_filter->handle_target_data(piece_of_transfer);
|
||||
}
|
||||
virtual void stop(std::string& OUT collect_remains)
|
||||
virtual void stop(std::string& collect_remains)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
#include "levin_base.h"
|
||||
#include "misc_language.h"
|
||||
#include "syncobj.h"
|
||||
#include "misc_os_dependent.h"
|
||||
|
||||
#include <random>
|
||||
#include <chrono>
|
||||
|
|
|
@ -31,23 +31,16 @@
|
|||
|
||||
//#include <Winsock2.h>
|
||||
//#include <Ws2tcpip.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/preprocessor/selection/min.hpp>
|
||||
#include <boost/lambda/bind.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
#include <boost/interprocess/detail/atomic.hpp>
|
||||
#include "net/net_utils_base.h"
|
||||
#include "misc_language.h"
|
||||
//#include "profile_tools.h"
|
||||
#include "../string_tools.h"
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
#define MONERO_DEFAULT_LOG_CATEGORY "net"
|
||||
|
|
|
@ -29,13 +29,11 @@
|
|||
#ifndef _NET_UTILS_BASE_H_
|
||||
#define _NET_UTILS_BASE_H_
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <memory>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <typeinfo>
|
||||
#include <type_traits>
|
||||
#include "serialization/keyvalue_serialization.h"
|
||||
#include "string_tools.h"
|
||||
#include "misc_log_ex.h"
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
|
@ -45,7 +43,6 @@
|
|||
#define MAKE_IP( a1, a2, a3, a4 ) (a1|(a2<<8)|(a3<<16)|(a4<<24))
|
||||
#endif
|
||||
|
||||
|
||||
namespace epee
|
||||
{
|
||||
namespace net_utils
|
||||
|
@ -214,19 +211,8 @@ namespace net_utils
|
|||
inline bool operator>=(const network_address& lhs, const network_address& rhs)
|
||||
{ return !lhs.less(rhs); }
|
||||
|
||||
inline bool create_network_address(network_address &address, const std::string &string, uint16_t default_port = 0)
|
||||
{
|
||||
uint32_t ip;
|
||||
uint16_t port;
|
||||
if (epee::string_tools::parse_peer_from_string(ip, port, string))
|
||||
{
|
||||
if (default_port && !port)
|
||||
port = default_port;
|
||||
address = ipv4_network_address{ip, port};
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool create_network_address(network_address &address, const std::string &string, uint16_t default_port = 0);
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
@ -309,21 +295,8 @@ namespace net_utils
|
|||
//some helpers
|
||||
|
||||
|
||||
inline
|
||||
std::string print_connection_context(const connection_context_base& ctx)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << ctx.m_remote_address.str() << " " << epee::string_tools::get_str_from_guid_a(ctx.m_connection_id) << (ctx.m_is_income ? " INC":" OUT");
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
inline
|
||||
std::string print_connection_context_short(const connection_context_base& ctx)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << ctx.m_remote_address.str() << (ctx.m_is_income ? " INC":" OUT");
|
||||
return ss.str();
|
||||
}
|
||||
std::string print_connection_context(const connection_context_base& ctx);
|
||||
std::string print_connection_context_short(const connection_context_base& ctx);
|
||||
|
||||
inline MAKE_LOGGABLE(connection_context_base, ct, os)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue