diff options
Diffstat (limited to 'examples/nonblocking.py')
-rw-r--r-- | examples/nonblocking.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/nonblocking.py b/examples/nonblocking.py new file mode 100644 index 00000000..ed8cc7c9 --- /dev/null +++ b/examples/nonblocking.py @@ -0,0 +1,8 @@ +import time +from libmproxy.script import concurrent + +@concurrent +def request(context, flow): + print "handle request: %s%s" % (flow.request.host, flow.request.path) + time.sleep(5) + print "start request: %s%s" % (flow.request.host, flow.request.path)
\ No newline at end of file |