piermesh/docs/Sponge/Protocols/Yellow.md

87 lines
1.4 KiB
Markdown
Raw Normal View History

2024-11-26 17:43:02 +00:00
<a id="sponge-protocols-yellow"></a>
# Sponge.Protocols.Yellow
### *class* Sponge.Protocols.Yellow.YCTX(packetsID, packetCount, pAction, todo, cryptographyInfo, sourceNode, subMessage=False, subMessages={}, submessagesIDs=[], eData=None)
Context data structure for message parsing
### *class* Sponge.Protocols.Yellow.Yellow(yctx: [YCTX](#Sponge.Protocols.Yellow.YCTX))
Message parser thats subclassed to easily make parsers for specific protocols
#### yctx
Message parsing context
* **Type:**
[YCTX](#Sponge.Protocols.Yellow.YCTX)
#### message
#### submessages
Dictionary of submessages
* **Type:**
dict
#### submessagesIDs
List of required submessages
* **Type:**
list
#### finishedSubmessages
Dictionary of finished submessages
* **Type:**
dict
#### dataOrder
List that maps packets based on their received order
* **Type:**
list
#### data
Data of primary message
* **Type:**
list
#### nonce
Cryptography artifact for decrypting message
#### tag
Cryptography artifact for decrypting message
#### gotHead
Whether weve gotten the head/header packet
* **Type:**
bool
#### todo
Queue of actions to execute in the main loop
#### checkComplete()
#### *async* doAct(setpAction=False, repeatDataOnActions=[], subMessage=False)
#### *async* dump()
#### *async* id()
#### pActions *= []*
#### *async* processPacket(p, subMessage=False, rdoaoc=[])