koi_net.components.handshaker
Classes
|
Handles handshaking with other nodes. |
- class koi_net.components.handshaker.Handshaker(log, cache, identity, event_queue, config, graph)[source]
Bases:
objectHandles handshaking with other nodes.
- Parameters:
log (Logger)
cache (Cache)
identity (NodeIdentity)
event_queue (EventQueue)
config (BaseNodeConfig)
graph (NetworkGraph)
- cache: Cache
- config: BaseNodeConfig
- event_queue: EventQueue
- graph: NetworkGraph
- handshake_with(target)[source]
Initiates a handshake with target node.
Pushes successive FORGET and NEW events to target node to reset the target’s cache in case it already knew this node.
- Parameters:
target (KoiNetNode)
- identity: NodeIdentity
- log: Logger