From 33d6a4e9eae2a6eb6040ee55f5d87ee8cd7785e5 Mon Sep 17 00:00:00 2001 From: liris Date: Fri, 15 May 2015 08:38:02 +0900 Subject: [PATCH] -m fixed #183 --- bin/wsdump.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/wsdump.py b/bin/wsdump.py index 6a9d1d8..093b8e7 100755 --- a/bin/wsdump.py +++ b/bin/wsdump.py @@ -49,6 +49,8 @@ def parse_args(): help="Set subprotocols") parser.add_argument("-o", "--origin", help="Set origin") + parser.add_argument("--eof-wait", default=0, type=int, + help="wait time(second) after 'EOF' recieved.") parser.add_argument("-t", "--text", help="Send initial text") @@ -138,10 +140,10 @@ def main(): try: message = console.raw_input("> ") ws.send(message) - time.sleep(0.05) except KeyboardInterrupt: return except EOFError: + time.sleep(args.eof_wait) return