mitmproxy/test/scripts/concurrent_decorator.py

33 lines
492 B
Python
Raw Normal View History

import time
from libmproxy.script import concurrent
@concurrent
def clientconnect(context, cc):
context.log("clientconnect")
@concurrent
def serverconnect(context, sc):
context.log("serverconnect")
@concurrent
def request(context, flow):
2015-11-29 02:13:08 +00:00
time.sleep(0.1)
@concurrent
def response(context, flow):
context.log("response")
@concurrent
def error(context, err):
context.log("error")
@concurrent
def clientdisconnect(context, dc):
2015-05-30 00:03:28 +00:00
context.log("clientdisconnect")