Protocol¶
Definition of abstract protocol type.
This module defines the protocol type inherited by all protocol code implementations. Also defined is the stack protocol, which adds push and pop functionality.
- class src.protocol.Protocol(own: Node, name: str)¶
Abstract protocol class for code running on network nodes.
- name¶
label for protocol instance.
- Type:
str
- class src.protocol.StackProtocol(own: Node, name: str)¶
Abstract protocol class for protocols in a stack structure.
Adds interfaces for push and pop functions.
- name¶
label for protocol instance.
- Type:
str
- upper_protocols¶
Protocols to pop to.
- Type:
List[StackProtocol]
- lower_protocols¶
Protocols to push to.
- Type:
List[StackProtocol]
- abstract pop(**kwargs)¶
Method to receive information from protocols lower on stack (abstract).
- abstract push(**kwargs)¶
Method to receive information from protocols higher on stack (abstract).