added a first "minimal" example - splitted code to be prepared for generator
[libt2n] / examples / minimalistic-client.cpp
diff --git a/examples/minimalistic-client.cpp b/examples/minimalistic-client.cpp
new file mode 100644 (file)
index 0000000..b2d8b8a
--- /dev/null
@@ -0,0 +1,20 @@
+/***************************************************************************
+ *   Copyright (C) 2004 by Intra2net AG                                    *
+ *   info@intra2net.com                                                    *
+ *                                                                         *
+ ***************************************************************************/
+
+#include <socket_client.hxx>
+
+// include library header
+#include "minimalistic-client-stub.hxx"
+
+int main(int argc, char** argv)
+{
+  extended_type_info_test();
+
+  libt2n::socket_client_connection sc("./socket");
+  cmd_group_example_client cc(sc);
+
+  return (cc.testfunc("hello")=="hello, testfunc() was here") ? EXIT_SUCCESS : EXIT_FAILURE;
+}