docs: TCPFlow.messages

This commit is contained in:
Maximilian Hils 2022-02-27 07:58:00 +01:00
parent 2d2a9f3c52
commit 5cdd2bc6ec

View File

@ -40,9 +40,16 @@ class TCPFlow(flow.Flow):
A TCPFlow is a simplified representation of a TCP session.
"""
messages: List[TCPMessage]
"""
The messages transmitted over this connection.
The latest message can be accessed as `flow.messages[-1]` in event hooks.
"""
def __init__(self, client_conn, server_conn, live=None):
super().__init__("tcp", client_conn, server_conn, live)
self.messages: List[TCPMessage] = []
self.messages = []
_stateobject_attributes = flow.Flow._stateobject_attributes.copy()
_stateobject_attributes["messages"] = List[TCPMessage]