summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/udp/Client.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-10-23 14:42:59 -0230
committerDwayne Boone <dwayne@zeroc.com>2008-10-23 14:42:59 -0230
commit845b03ddfa20fef3b57818086b6ec7266d8db147 (patch)
treef082980f7fa6c50006f24bedf29423b2bbf9739b /cpp/test/Ice/udp/Client.cpp
parentFixed locator implementation to not serialize anymore locator request for non... (diff)
downloadice-845b03ddfa20fef3b57818086b6ec7266d8db147.tar.bz2
ice-845b03ddfa20fef3b57818086b6ec7266d8db147.tar.xz
ice-845b03ddfa20fef3b57818086b6ec7266d8db147.zip
Bug 3164 - add udp test
Diffstat (limited to 'cpp/test/Ice/udp/Client.cpp')
-rw-r--r--cpp/test/Ice/udp/Client.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/cpp/test/Ice/udp/Client.cpp b/cpp/test/Ice/udp/Client.cpp
new file mode 100644
index 00000000000..27a6e8ff460
--- /dev/null
+++ b/cpp/test/Ice/udp/Client.cpp
@@ -0,0 +1,57 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 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.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+using namespace Test;
+
+int
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+{
+ TestIntfPrx allTests(const Ice::CommunicatorPtr&);
+ TestIntfPrx obj = allTests(communicator);
+ obj->shutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if(communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}