Classified ads
|
Pure-virtual interface of nodemodel. More...
#include <mnodemodelprotocolinterface.h>
Classes | |
struct | HostConnectQueueItemStructure |
Public Types | |
typedef struct MNodeModelProtocolInterface::HostConnectQueueItemStructure | HostConnectQueueItem |
Public Member Functions | |
virtual bool | nodeGreetingReceived (Node &aNode, bool aWasInitialGreeting=false)=0 |
virtual Hash & | nodeFingerPrint ()=0 |
virtual int | listenPortOfThisNode ()=0 |
virtual void | setListenPortOfThisNode (int port)=0 |
virtual const QSslCertificate & | nodeCert () const =0 |
virtual const QSslKey & | nodeKey () const =0 |
virtual QByteArray * | getNextItemToSend (Connection &aConnection)=0 |
virtual Node * | nodeByHash (const Hash &aHash)=0 |
virtual QList< Node * > * | getNodesBeforeHash (const Hash &aHash, unsigned aMaxNodes)=0 |
virtual void | closeOldestInactiveConnection ()=0 |
virtual QList< Node * > * | getNodesAfterHash (const Hash &aHash, unsigned aMaxNodes, int aMaxInactivityMinutes=-1)=0 |
virtual QList< HostConnectQueueItem > | getHotAddresses ()=0 |
virtual bool | updateNodeLastConnectTimeInDb (Node &aNode)=0 |
virtual QList< Node * > * | getHotNodes (int aMaxNodes)=0 |
virtual void | addNodeFromBroadcast (const Hash &aNodeFingerPrint, const QHostAddress &aAddr, int aPort)=0 |
virtual bool | addNodeToConnectionWishList (Node *aNode)=0 |
virtual bool | addNodeToConnectionWishList (const Hash &aNode)=0 |
virtual Node * | nextConnectionWishListItem ()=0 |
virtual bool | isNodeAlreadyConnected (const Node &aNode) const =0 |
virtual bool | isNodeAlreadyConnected (const Hash &aHash) const =0 |
virtual Hash | bucketEndHash (const Hash &aFingerPrintOfNodeAsking)=0 |
virtual bool | updateNodeLastMutualConnectTimeInDb (const Hash &aNodeFp, quint32 aTime)=0 |
virtual void | setDnsName (QString aName)=0 |
virtual QString | getDnsName ()=0 |
virtual void | offerNodeToRecentlyFailedList (const Hash &aFailedNodeHash)=0 |
Pure-virtual interface of nodemodel.
Interface for node-specific part of datamodel. Exists Mainly for testing purposes. Contains all methods of node-model that are of interest to parties outside datamodel. See NodeModel.
typedef struct MNodeModelProtocolInterface::HostConnectQueueItemStructure MNodeModelProtocolInterface::HostConnectQueueItem |
structure used for communicating lists of nodes to connect between datamodel and networking parts. Basically these are nodes but reduced to plain addr/hash.
|
pure virtual |
method for adding node reference from broadcast. this needs difference in handling because in IPv4 network this typically contains private addr space addresses that we don't want to permanently store nor give to others as node-references.
For making connections inside LANs of organisations having NATs and firewalls and whatnot this might still be a handy feature.
Implemented in NodeModel.
|
pure virtual |
method for adding a node to connection-wishlist. network connector engine will then later pick them up. nodemodel will take ownership of the node and delete the object later.
Implemented in NodeModel.
|
pure virtual |
method for adding a node to connection-wishlist. network connector engine will then later pick them up.
Implemented in NodeModel.
|
pure virtual |
Important method regarding churn here. This is called from Connection class and this method is used to determine what content belongs to same bucket with the node that is being served by that Connection. Content in the same bucket with the node is then sent over to node ; to keep the content alive in the network.
Intent here is find bucket size where we have approximately 20 live nodes in a bucket.
This is done so that we order the recently-seen nodes by hash value of the node, then start from the fingerprint of the node that is asking, and from that point we count to 20. The fingerprint of the node at position 20 is the end of the bucket. The fingerprint of the node that asks is the start.
aFingerPrintOfNodeAsking | fingerprint of node that wants to have its bucket filled |
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
called from settings dialog and own node construction
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
method for checking if a node is already connected
Implemented in NodeModel.
|
pure virtual |
Method for checking if a node is already connected. This version checks only hash, not addresses.
Implemented in NodeModel.
|
pure virtual |
TCP listen port number method
Implemented in NodeModel.
|
pure virtual |
method for getting one node from wishlist. caller is obliged to delete the node returned.
Implemented in NodeModel.
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
returns fingerprint of this node
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
getter for ssl certificate of SSL sock
Implemented in NodeModel.
|
pure virtual |
used to offer node to list of recently failed connections. this model maintains a list of such nodes and tries to not immediately re-connect a recently failed node
Implemented in NodeModel.
|
pure virtual |
called from settings dialog
Implemented in NodeModel.
|
pure virtual |
for setting of tcp listen port
Implemented in NodeModel.
|
pure virtual |
Implemented in NodeModel.
|
pure virtual |
updates last mutual connect time, used for deciding what content to send automatically upon node connect
Implemented in NodeModel.