Fixes and clean up for peer management.

This commit is contained in:
Arthur Britto
2012-06-20 13:40:03 -07:00
parent 71e6921a61
commit a2c5b90fe9
4 changed files with 278 additions and 196 deletions

View File

@@ -34,6 +34,7 @@ private:
bool mConnected; // True, if hello accepted.
NewcoinAddress mNodePublic; // Node public key of peer.
ipPort mIpPort;
ipPort mIpPortConnect;
uint256 mCookieHash;
// network state information
@@ -99,7 +100,7 @@ public:
std::string& getIP() { return mIpPort.first; }
int getPort() { return mIpPort.second; }
void peerIpPort(const std::string& strIP, int iPort) { mIpPort = make_pair(strIP, iPort); }
void setIpPort(const std::string& strIP, int iPort);
static pointer create(boost::asio::io_service& io_service, boost::asio::ssl::context& ctx)
{