diff options
author | Michi Henning <michi@zeroc.com> | 2006-06-30 05:55:35 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2006-06-30 05:55:35 +0000 |
commit | a965dc8955807aadcfeb30232bf25ae06f97b7f8 (patch) | |
tree | 6c67a350d6e92614bfca7b289d1aa1fd8c1929cd /cs/demo/IceBox/hello/Client.cs | |
parent | Added exception to PluginManager to avoid throwing if IceSSL isn't found (diff) | |
download | ice-a965dc8955807aadcfeb30232bf25ae06f97b7f8.tar.bz2 ice-a965dc8955807aadcfeb30232bf25ae06f97b7f8.tar.xz ice-a965dc8955807aadcfeb30232bf25ae06f97b7f8.zip |
Bug 1152.
Diffstat (limited to 'cs/demo/IceBox/hello/Client.cs')
-rw-r--r-- | cs/demo/IceBox/hello/Client.cs | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/cs/demo/IceBox/hello/Client.cs b/cs/demo/IceBox/hello/Client.cs index 61e0996f226..a8340fc596f 100644 --- a/cs/demo/IceBox/hello/Client.cs +++ b/cs/demo/IceBox/hello/Client.cs @@ -14,7 +14,7 @@ public class Client : Ice.Application { private static void menu() { - Console.WriteLine( + Console.Write( "usage:\n" + "t: send greeting as twoway\n" + "o: send greeting as oneway\n" + @@ -22,14 +22,27 @@ public class Client : Ice.Application "d: send greeting as datagram\n" + "D: send greeting as batch datagram\n" + "f: flush all batch requests\n" + - "T: set a timeout\n" + - "S: switch secure mode on/off\n" + - "x: exit\n" + + "T: set a timeout"); + if(_haveSSL) + { + Console.Write("\nS: switch secure mode on/off"); + } + Console.WriteLine( + "\nx: exit\n" + "?: help\n"); } public override int run(string[] args) { + try + { + communicator().getPluginManager().getPlugin("IceSSL"); + _haveSSL = true; + } + catch(Ice.NotRegisteredException) + { + } + Ice.Properties properties = communicator().getProperties(); string proxyProperty = "Hello.Proxy"; string proxy = properties.getProperty(proxyProperty); @@ -182,4 +195,6 @@ public class Client : Ice.Application System.Environment.Exit(status); } } + + private bool _haveSSL = false; } |