#include <Node.h>
Inheritance diagram for Node::
Public Methods | |
Node () | |
Constructor. More... | |
Node (const Node &) | |
virtual | ~Node () |
Destructor. More... | |
SocketAddress * | getSocketAddress () |
TimeValue | getRtt () |
Get the round trip time to this node. More... | |
void | setRtt (TimeValue) |
Set RTT for this Node. More... | |
int | getVersionNumber () |
Get the protocol version number this node supports. More... | |
void | setVersionNumber (int) |
Set the protocol version number this node supports. More... | |
bool | isConnected () |
Return true if we are connected to this Node, false otherwise. More... | |
bool | isNatted () |
Return true if this node is behing a NAT. More... | |
bool | isTrusted () |
Return true if this node is trusted peer. More... | |
bool | isFirewalled () |
Return true if this node is behind a country-wide firewall. More... | |
bool | cantConnect () |
void | setSocketAddress (SocketAddress *socketAddress) |
Copies the socket address passed in. More... | |
void | setIsNatted (bool val) |
void | setIsTrusted (bool val) |
void | setIsFirewalled (bool val) |
void | setCantConnect (bool) |
bool | equals (Node *node) |
returns true if the IP addresses are equal. More... | |
bool | equals (ConnectionInterface *connection) |
Return true if the IP addresses are equal. More... | |
void | handleEvent (ObservableInterface *, int eventType, void *object) |
Passes connection events on to NodeListeners. More... | |
virtual void | toStream (std::ostream &out) |
Static Public Attributes | |
string | beginTag = "<Node>" |
string | endTag = "</Node>" |
string | TRUSTED_TAG = "isTrusted" |
string | FIREWALL_TAG = "isFirewalled" |
string | NAT_TAG = "isNatted" |
string | SOCKET_ADDRESS_TAG = "socketAddress" |
string | RTT_TAG = "rtt" |
string | VERSION_TAG = "version" |
Protected Attributes | |
SocketAddress | m_socketAddress |
TimeValue | m_rtt |
Average RTT to this node. More... | |
bool | m_isNatted |
true if the node is NATed. More... | |
bool | m_isFirewalled |
true if the node is firewalled. More... | |
bool | m_isTrusted |
true if we trust the node. More... | |
int | m_versionNumber |
the protocol version number this node supports. More... | |
bool | m_isConnected |
bool | m_cantConnect |
Friends | |
std::istream & | operator>> (std::istream &in, Node &node) |
Read in a Node configuration. More... |
Definition at line 18 of file Node.h.
|
Constructor.
|
|
|
|
Destructor.
|
|
Definition at line 137 of file Node.cpp. Referenced by Catcher::getUnconnectedNode().
|
|
Return true if the IP addresses are equal.
|
|
returns true if the IP addresses are equal.
Definition at line 231 of file Node.cpp. Referenced by LinkLayerInterface::broadcast(), LinkLayerInterface::close(), VirtualCircuitTable::findByDest(), VirtualCircuitTable::findBySrc(), VirtualCircuitTable::findNode(), LinkLayerInterface::getRandomNeighbor(), VirtualCircuitTable::isThisPacketForMe(), NetworkLayer::isThisPacketForMe(), VirtualCircuitTable::remove(), and LinkLayerInterface::sendPacket().
|
|
Get the round trip time to this node.
Definition at line 166 of file Node.cpp. Referenced by NetworkLayer::handlePongPacket().
|
|
|
Get the protocol version number this node supports.
|
|
Passes connection events on to NodeListeners.
Reimplemented from ListenerInterface. |
|
Return true if we are connected to this Node, false otherwise.
Definition at line 59 of file Node.cpp. Referenced by NodeManagerCommand::displayNode(), Catcher::getUnconnectedNode(), and NodeManagerCommand::run().
|
|
Return true if this node is behind a country-wide firewall.
Definition at line 104 of file Node.cpp. Referenced by NodeManagerCommand::displayNode(), ConnectionManagerCommand::displayNode(), VisualizerFrame::drawNodes(), UserConfiguration::generateNodeHtmlInterface(), and SummaryScreenCommand::getHtmlInterface().
|
|
Return true if this node is behing a NAT.
Definition at line 86 of file Node.cpp. Referenced by NodeManagerCommand::displayNode(), ConnectionManagerCommand::displayNode(), VisualizerFrame::drawNodes(), UserConfiguration::generateNodeHtmlInterface(), and SummaryScreenCommand::getHtmlInterface().
|
|
Return true if this node is trusted peer.
Definition at line 95 of file Node.cpp. Referenced by NodeManagerCommand::displayNode(), ConnectionManagerCommand::displayNode(), and UserConfiguration::generateNodeHtmlInterface().
|
|
Definition at line 143 of file Node.cpp. Referenced by LinkLayerInterface::connect(), and LinkLayerInterface::peerConnectImpl().
|
|
Definition at line 131 of file Node.cpp. Referenced by Node(), NetworkLayer::handleImHerePacket(), operator>>(), and UserConfiguration::setNode().
|
|
Definition at line 119 of file Node.cpp. Referenced by Node(), NetworkLayer::handleImHerePacket(), operator>>(), and UserConfiguration::setNode().
|
|
Definition at line 125 of file Node.cpp. Referenced by Node(), NetworkLayer::handleImHerePacket(), operator>>(), and UserConfiguration::setNode().
|
|
Set RTT for this Node.
Definition at line 175 of file Node.cpp. Referenced by NetworkLayer::handlePongPacket().
|
|
Copies the socket address passed in.
Definition at line 113 of file Node.cpp. Referenced by Config::Config(), LinkLayerInterface::accept(), NetworkLayer::handleImHerePacket(), operator>>(), and UserConfiguration::setNode().
|
|
Set the protocol version number this node supports.
Definition at line 77 of file Node.cpp. Referenced by Node(), NetworkLayer::handleImHerePacket(), and operator>>().
|
|
Reimplemented from BasicObject. |
|
Read in a Node configuration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
true if the node is firewalled.
|
|
true if the node is NATed.
|
|
true if we trust the node.
|
|
Average RTT to this node.
|
|
|
|
the protocol version number this node supports.
|