diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-12-01 12:57:06 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-12-01 12:57:06 +0000 |
commit | 88c29a660e5361866c8fa3d6356532db42f0da81 (patch) | |
tree | 8a27e5f6c2cb3a493488944558148f409251f13d /py/demo/Ice/hello/Client.py | |
parent | Use deactivation timeout for loadServer call (diff) | |
download | ice-88c29a660e5361866c8fa3d6356532db42f0da81.tar.bz2 ice-88c29a660e5361866c8fa3d6356532db42f0da81.tar.xz ice-88c29a660e5361866c8fa3d6356532db42f0da81.zip |
Added better timeout test
Diffstat (limited to 'py/demo/Ice/hello/Client.py')
-rw-r--r-- | py/demo/Ice/hello/Client.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/py/demo/Ice/hello/Client.py b/py/demo/Ice/hello/Client.py index 06b0972385c..d812b4978fc 100644 --- a/py/demo/Ice/hello/Client.py +++ b/py/demo/Ice/hello/Client.py @@ -24,6 +24,7 @@ d: send greeting as datagram D: send greeting as batch datagram f: flush all batch requests T: set a timeout +P: set a server delay S: switch secure mode on/off s: shutdown server x: exit @@ -45,6 +46,7 @@ class Client(Ice.Application): secure = False timeout = -1 + delay = 0 menu() @@ -53,21 +55,21 @@ class Client(Ice.Application): try: c = raw_input("==> ") if c == 't': - twoway.sayHello() + twoway.sayHello(delay) elif c == 'o': - oneway.sayHello() + oneway.sayHello(delay) elif c == 'O': - batchOneway.sayHello() + batchOneway.sayHello(delay) elif c == 'd': if secure: print "secure datagrams are not supported" else: - datagram.sayHello() + datagram.sayHello(delay) elif c == 'D': if secure: print "secure datagrams are not supported" else: - batchDatagram.sayHello() + batchDatagram.sayHello(delay) elif c == 'f': self.communicator().flushBatchRequests() elif c == 'T': @@ -84,6 +86,16 @@ class Client(Ice.Application): print "timeout is now switched off" else: print "timeout is now set to 2000ms" + elif c == 'P': + if delay == 0: + delay = 2500 + else: + delay = 0 + + if delay == 0: + print "server delay is now deactivated" + else: + print "server delay is now set to 2500ms" elif c == 'S': secure = not secure |