#include <ip.hpp>
Definition at line 44 of file ip.hpp.
◆ endpoint() [1/2]
fc::ip::endpoint::endpoint |
( |
| ) |
|
◆ endpoint() [2/2]
Definition at line 54 of file ip.cpp.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
◆ from_string()
Converts "IP:PORT" to an endpoint
Definition at line 74 of file ip.cpp.
75 {
76 try
77 {
79 auto pos = endpoint_string.find(':');
80 ep._ip = boost::asio::ip::address_v4::from_string(endpoint_string.substr( 0, pos ) ).to_ulong();
81 ep._port = boost::lexical_cast<uint16_t>( endpoint_string.substr( pos+1, endpoint_string.size() ) );
82 return ep;
83 }
85 }
#define FC_RETHROW_EXCEPTIONS(LOG_LEVEL, FORMAT,...)
Catchs all exception's, std::exceptions, and ... and rethrows them after appending the provided log m...
◆ get_address()
const address & fc::ip::endpoint::get_address |
( |
| ) |
const |
◆ operator string()
fc::ip::endpoint::operator string |
( |
| ) |
const |
returns "IP:PORT"
Definition at line 87 of file ip.cpp.
88 {
89 try
90 {
91 return string(_ip) +
':' +
fc::string(boost::lexical_cast<std::string>(_port).c_str());
92 }
94 }
◆ port()
uint16_t fc::ip::endpoint::port |
( |
| ) |
const |
◆ set_port()
void fc::ip::endpoint::set_port |
( |
uint16_t | p | ) |
|
|
inline |
◆ operator!=
Definition at line 60 of file ip.cpp.
60 {
61 return a._port != b._port ||
a._ip != b._ip;
62 }
◆ operator<
◆ operator==
Definition at line 57 of file ip.cpp.
57 {
58 return a._port == b._port &&
a._ip == b._ip;
59 }
The documentation for this class was generated from the following files:
- libraries/fc/include/fc/network/ip.hpp
- libraries/fc/src/network/ip.cpp