diff options
Diffstat (limited to 'src/p2p/connection_basic.cpp')
-rw-r--r-- | src/p2p/connection_basic.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/p2p/connection_basic.cpp b/src/p2p/connection_basic.cpp index ed15c0986..0454f30e3 100644 --- a/src/p2p/connection_basic.cpp +++ b/src/p2p/connection_basic.cpp @@ -94,6 +94,18 @@ namespace epee namespace net_utils { + std::string to_string(t_connection_type type) + { + if (type == e_connection_type_NET) + return std::string("NET"); + else if (type == e_connection_type_RPC) + return std::string("RPC"); + else if (type == e_connection_type_P2P) + return std::string("P2P"); + + return std::string("UNKNOWN"); + } + /* ============================================================================ */ |