PIFile: applyFileInfo

PIPeer: fixed
pisd work progress ...

git-svn-id: svn://db.shs.com.ru/pip@20 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-03-12 13:28:27 +00:00
parent 3ed292a602
commit fdb48aba64
14 changed files with 346 additions and 148 deletions

View File

@@ -51,7 +51,7 @@ public:
friend PIByteArray & operator <<(PIByteArray & s, const PIPeer::PeerInfo & v);
friend PIByteArray & operator >>(PIByteArray & s, PIPeer::PeerInfo & v);
public:
PeerInfo() {dist = sync = cnt = 0; _neth = 0; _first = 0;}
PeerInfo() {dist = sync = cnt = 0; _neth = 0; _first = 0; was_update = false;}
struct Address {
Address(const PIString & a = PIString(), const PIString & m = "255.255.255.0");
@@ -70,6 +70,7 @@ public:
bool isNeighbour() const {return dist == 0;}
int ping() const;
PIString fastestAddress() const;
protected:
void addNeighbour(const PIString & n) {if (!neighbours.contains(n)) neighbours << n;}
@@ -79,6 +80,7 @@ public:
PIString nearest_address;
PIStringList neighbours;
int sync, cnt;
bool was_update;
PISystemTime time;
PIString _naddress;
PIEthernet * _neth;