--- /dev/null
+INCLUDES = -I$(top_srcdir)/src @BOOST_CPPFLAGS@ @CPPUNIT_CFLAGS@ -I$(top_srcdir)/codegen
+
+LDADD = $(top_builddir)/src/libt2n.la @BOOST_SERIALIZATION_LIB@ @BOOST_LDFLAGS@
+
+libclient_la_SOURCES = codegen_client.cpp
+noinst_LTLIBRARIES = libclient.la
+
+client_SOURCES = client.cpp
+client_LDADD = $(LDADD) libclient.la
+
+server_SOURCES = server.cpp codegen_server.cpp
+
+noinst_PROGRAMS = client server
+
+all-local: server.xml
+
+client.cpp codegen_common.hxx codegen_common.cpp codegen_client.hxx codegen_client.cpp codegen_server.cpp: server.xml
+
+server.xml: server.cpp $(top_builddir)/codegen/codegen
+ cp $(top_srcdir)/codegen/codegen-stubhead.hxx codegen_common.hxx
+ gccxml $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) server.hxx -fxml=tmpserver.xml
+ $(top_builddir)/codegen/codegen tmpserver.xml codegen_
+ mv tmpserver.xml server.xml
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2004 by Intra2net AG *
+ * info@intra2net.com *
+ * *
+ ***************************************************************************/
+
+#include <socket_client.hxx>
+
+// include library header
+#include "codegen_client.hxx"
+
+int main(int argc, char** argv)
+{
+ libt2n::socket_client_connection sc("./socket");
+ cmd_group_example_client cc(sc);
+
+ return (cc.testfunc("hello")=="hello, testfunc() was here") ? EXIT_SUCCESS : EXIT_FAILURE;
+}
--- /dev/null
+#include <socket_server.hxx>
+#include <command_server.hxx>
+
+#include "server.hxx"
+
+using namespace libt2n;
+
+int main(int argc, char** argv) {
+ socket_server ss("./socket");
+ group_command_server<cmd_group_default> cs(ss);
+
+ // handle requests (without timeout)
+ while(true)
+ cs.handle();
+
+ return 0;
+}
--- /dev/null
+#include <string>
+#include "codegen_common.hxx"
+
+using namespace std;
+
+LIBT2N_SET_DEFAULTGROUP(example);
+
+LIBT2N_EXPORT std::string testfunc(std::string str)
+{
+ string ret;
+ if (str=="throw")
+ throw libt2n::t2n_runtime_error("throw me around");
+ if (str=="big")
+ ret.insert(0,100*1024,'x');
+ else
+ ret=str+", testfunc() was here";
+ return ret;
+}