summaryrefslogtreecommitdiff
path: root/cs/demo/Ice/multicast/Server.cs
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-12-13 14:49:32 -0330
committerDwayne Boone <dwayne@zeroc.com>2007-12-13 14:49:32 -0330
commit095ce5674bfa3c48b0cabbc2e37a10c0433a46aa (patch)
tree8c66092204389e83f3e678ff0f12dae45ab567a4 /cs/demo/Ice/multicast/Server.cs
parent- Fixes to makemsi.py to support new directory structure. (diff)
downloadice-095ce5674bfa3c48b0cabbc2e37a10c0433a46aa.tar.bz2
ice-095ce5674bfa3c48b0cabbc2e37a10c0433a46aa.tar.xz
ice-095ce5674bfa3c48b0cabbc2e37a10c0433a46aa.zip
Added multicast demo
Diffstat (limited to 'cs/demo/Ice/multicast/Server.cs')
-rwxr-xr-xcs/demo/Ice/multicast/Server.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/cs/demo/Ice/multicast/Server.cs b/cs/demo/Ice/multicast/Server.cs
new file mode 100755
index 00000000000..a76ccdf91a9
--- /dev/null
+++ b/cs/demo/Ice/multicast/Server.cs
@@ -0,0 +1,36 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+public class Server : Ice.Application
+{
+ public override int run(string[] args)
+ {
+ if(args.Length > 0)
+ {
+ System.Console.Error.WriteLine(appName() + ": too many arguments");
+ return 1;
+ }
+
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
+ adapter.add(new HelloI(), communicator().stringToIdentity("hello"));
+ adapter.activate();
+ communicator().waitForShutdown();
+ return 0;
+ }
+
+ public static void Main(string[] args)
+ {
+ Server app = new Server();
+ int status = app.main(args, "config.server");
+ if(status != 0)
+ {
+ System.Environment.Exit(status);
+ }
+ }
+}