OverSim
KademliaNodeHandle.cc File Reference

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const MarkedNodeHandle &n)

Detailed Description

Author
Bernhard Heep

Definition in file KademliaNodeHandle.cc.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MarkedNodeHandle n 
)

Definition at line 27 of file KademliaNodeHandle.cc.

{
if (n.ip.isUnspecified()) {
os << "<addr unspec> ";
} else {
os << n.ip << ":" << n.port << " ";
}
if (n.key.isUnspecified()) {
os << "<key unspec>";
} else {
os << n.key;
}
if (n.isAlive) {
os << " ALIVE";
} else {
os << " NOT ALIVE";
}
return os;
};