mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
08895e9ba6
- restructure examples (fix #4031) - remove example dependencies from setup.py, we do not need special dependencies for our supported addons. - unify how we generate docs from code - improve example docs
26 lines
647 B
Python
26 lines
647 B
Python
"""TCP-specific events."""
|
|
import mitmproxy.tcp
|
|
|
|
|
|
class Events:
|
|
def tcp_start(self, flow: mitmproxy.tcp.TCPFlow):
|
|
"""
|
|
A TCP connection has started.
|
|
"""
|
|
|
|
def tcp_message(self, flow: mitmproxy.tcp.TCPFlow):
|
|
"""
|
|
A TCP connection has received a message. The most recent message
|
|
will be flow.messages[-1]. The message is user-modifiable.
|
|
"""
|
|
|
|
def tcp_error(self, flow: mitmproxy.tcp.TCPFlow):
|
|
"""
|
|
A TCP error has occurred.
|
|
"""
|
|
|
|
def tcp_end(self, flow: mitmproxy.tcp.TCPFlow):
|
|
"""
|
|
A TCP connection has ended.
|
|
"""
|