mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 13:35:04 -04:00
abstracted nework addresses
All code which was using ip and port now uses a new IPv4 object, subclass of a new network_address class. This will allow easy addition of I2P addresses later (and also IPv6, etc). Both old style and new style peer lists are now sent in the P2P protocol, which is inefficient but allows peers using both codebases to talk to each other. This will be removed in the future. No other subclasses than IPv4 exist yet.
This commit is contained in:
parent
694470fae7
commit
072102cfd2
18 changed files with 512 additions and 261 deletions
|
@ -193,7 +193,7 @@ POP_WARNINGS
|
|||
//----------------------------------------------------------------------------
|
||||
bool get_ip_int32_from_string(uint32_t& ip, const std::string& ip_str);
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool parse_peer_from_string(uint32_t& ip, uint32_t& port, const std::string& addres)
|
||||
inline bool parse_peer_from_string(uint32_t& ip, uint16_t& port, const std::string& addres)
|
||||
{
|
||||
//parse ip and address
|
||||
std::string::size_type p = addres.find(':');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue