aboutsummaryrefslogtreecommitdiffstats
path: root/test/scripts/concurrent_decorator.py
blob: f6feda1d45b0a73f6cb06a9b80a7eb1cd1805e76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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):
    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):
    context.log("clientdisconnect")