Index: trunk/config.h.in
===================================================================
--- trunk/config.h.in	(revision 5821)
+++ trunk/config.h.in	(revision 5822)
@@ -65,4 +65,7 @@
 #undef HAVE_SDL_IMAGE_H
 
+/* Define to 1 if you have the <SDL_net.h> header file. */
+#undef HAVE_SDL_NET_H
+
 /* Define to 1 if you have the <SDL/SDL.h> header file. */
 #undef HAVE_SDL_SDL_H
@@ -70,4 +73,7 @@
 /* Define to 1 if you have the <SDL/SDL_image.h> header file. */
 #undef HAVE_SDL_SDL_IMAGE_H
+
+/* Define to 1 if you have the <SDL/SDL_net.h> header file. */
+#undef HAVE_SDL_SDL_NET_H
 
 /* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 5821)
+++ trunk/configure.ac	(revision 5822)
@@ -585,8 +585,25 @@
       echo "------------------"
       echo "SDL_image library not found."
-      echo "please install the SDL_image library, which can be found at http://www.l ibsdl.org/projects/SDL_image/"
+      echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
       echo "------------------"
       exit -1
    fi
+
+#---------#
+# SDL_Net #
+#---------#
+# checking for SDL_net-headers
+AC_CHECK_HEADERS([SDL_net.h] ,,
+    [AC_CHECK_HEADERS([SDL/SDL_net.h],, AC_MSG_ERROR([SDL_net header not found.]))])
+# checking for SDL_net-lib
+AC_CHECK_LIB([SDL_net], [main], [FOUND_SDL_net=yes; LIBS="$LIBS -lSDL_net"])
+   if test x$FOUND_SDL_net != xyes ; then
+      echo "------------------"
+      echo "SDL_net library not found."
+      echo "please install the SDL_net library, which can be found at http://www.libsdl.org/projects/SDL_net/"
+      echo "------------------"
+      exit -1
+   fi
+
 
 #-----#
@@ -722,4 +739,5 @@
                  src/lib/particles/Makefile
                  src/lib/collision_detection/Makefile
+		 src/lib/network/Makefile
                  src/lib/shell/Makefile
                  src/lib/gui/Makefile
@@ -733,4 +751,5 @@
                  src/subprojects/particles/Makefile
                  src/subprojects/collision_detection/Makefile
+                 src/subprojects/network/Makefile
                  ])
 
Index: trunk/scripts/gentoo/orxonox-0.3.2_alpha-rXXXX.ebuild
===================================================================
--- trunk/scripts/gentoo/orxonox-0.3.2_alpha-rXXXX.ebuild	(revision 5822)
+++ trunk/scripts/gentoo/orxonox-0.3.2_alpha-rXXXX.ebuild	(revision 5822)
@@ -0,0 +1,66 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils games
+
+DATA_VERSION=83
+
+DESCRIPTION="orxonox is an open-source 3D-action game programmed in C++, OpenGL, OpenAL and SDL"
+HOMEPAGE="http://www.orxonox.net"
+SRC_URI="http://www.orxonox.net/files/snapshots/${P}-${PR}.tar.bz2
+         http://www.orxonox.net/files/snapshots/${PN}-data-r${DATA_VERSION}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="gtk+-2"
+
+DEPEND="virtual/opengl
+        virtual/x11
+        media-libs/openal
+        media-libs/libsdl
+        media-libs/sdl-image
+        media-libs/sdl-ttf
+        media-libs/sdl-net
+        media-libs/glew"
+
+# Run-time dependencies, same as DEPEND if RDEPEND isn't defined:
+#RDEPEND=""
+S=${WORKDIR}/${P}
+
+src_unpack() {
+        unpack ${P}-${PR}.tar.bz2
+        cd "${S}"
+        unpack ${PN}-data-r${DATA_VERSION}.tar.bz2
+}
+
+src_compile() {
+        egamesconf || die
+
+        emake || die "emake failed"
+}
+
+src_install() {
+        make DESTDIR=${D} install || die
+
+        dodir ${GAMES_DATADIR}/${PN}
+        cp -r data/* ${D}/${GAMES_DATADIR}/${PN}/ \
+                || die "data copy failed"
+
+        dodoc AUTHORS ChangeLog README
+
+        prepgamesdirs
+
+        #make \
+        #       prefix=${D}/usr \
+        #       mandir=${D}/usr/share/man \
+        #       infodir=${D}/usr/share/info \
+        #       libdir=${D}/usr/$(get_libdir) \
+        #       install || die
+
+        #einstall || die
+}
+
+pkg_postinst() {
+        games_pkg_postinst
+}
Index: trunk/src/defs/class_id.h
===================================================================
--- trunk/src/defs/class_id.h	(revision 5821)
+++ trunk/src/defs/class_id.h	(revision 5822)
@@ -57,16 +57,20 @@
   // superclasses
   CL_MASK_SUPER_CLASS           =    0xff000000,
-  CL_BASE_OBJECT                =    0x01000000,
-
-  CL_PARENT_NODE                =    0x02000000,
-  CL_WORLD_ENTITY               =    0x04000000,
-
-  CL_STORY_ENTITY               =    0x08000000,
-
-  CL_PHYSICS_INTERFACE          =    0x10000000,
-
-  CL_EVENT_LISTENER             =    0x20000000,
-
-  CL_ELEMENT_2D                 =    0x40000000,
+  CL_BASE_OBJECT                =    0xff000000,
+
+  CL_PARENT_NODE                =    0x01000000,
+
+  CL_STORY_ENTITY               =    0x02000000,
+
+  CL_PHYSICS_INTERFACE          =    0x04000000,
+
+  CL_EVENT_LISTENER             =    0x08000000,
+
+  CL_ELEMENT_2D                 =    0x10000000,
+
+  CL_SYNCHRONIZEABLE             =    0x20000000,
+
+  CL_WORLD_ENTITY               =    0x40000000,
+
 
   // subsuper-classes
@@ -113,4 +117,6 @@
   CL_GLGUI_HANDLER              =    0x00000f40,
   CL_GLGUI_MAIN_WIDGET          =    0x00000f41,
+  CL_NETWORK_MANAGER            =    0x00000f50,
+
 
   // StoryEntities (range from 0x00000100 to 0x000001ff)
@@ -202,6 +208,15 @@
 
 
-  // misc: (range from 0x00000b00 to 0x00000cff)
-  CL_ANIMATION                  =    0x00000b01,
+  // network stuff (range from 0x00000b00 to 0x00000bff)
+  CL_DATA_STREAM                =    0x00b01000,
+  CL_NETWORK_STREAM             =    0x00000b01,
+  CL_NETWORK_PROTOCOL           =    0x00000b02,
+  CL_NETWORK_SOCKET             =    0x00000b03,
+  CL_CONNECTION_MONITOR         =    0x00000b04,
+
+
+
+  // misc: (range from 0x00000d00 to 0x00000eff)
+  CL_ANIMATION                  =    0x00000d01,
   //  CL_ANIMATION3D                =    0x00000b02,
   CL_QUICK_ANIMATION            =    0x00000b02,
@@ -226,7 +241,7 @@
 
   // Spatial Data Separation
-  CL_SPATIAL_SEPARATION         =    0x00000b0d,
-  CL_QUADTREE                   =    0x00000b0e,
-  CL_QUADTREE_NODE              =    0x00000b0f
+  CL_SPATIAL_SEPARATION         =    0x00000d0d,
+  CL_QUADTREE                   =    0x00000d0e,
+  CL_QUADTREE_NODE              =    0x00000d0f
 };
 
Index: trunk/src/defs/debug.h
===================================================================
--- trunk/src/defs/debug.h	(revision 5821)
+++ trunk/src/defs/debug.h	(revision 5822)
@@ -106,5 +106,9 @@
 #define PRINTF(x)        PRINT(x)
 #endif
+#ifndef NO_SHELL
 #define PRINT_EXEC       ShellBuffer::addBufferLineStatic
+#else /* NO_SHELL */
+#define PRINT_EXEC       printf
+#endif
 
 #ifndef PRINTF
Index: trunk/src/defs/include_paths.am
===================================================================
--- trunk/src/defs/include_paths.am	(revision 5821)
+++ trunk/src/defs/include_paths.am	(revision 5822)
@@ -19,4 +19,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/math
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/network
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/tinyxml
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics
Index: trunk/src/lib/Makefile.am
===================================================================
--- trunk/src/lib/Makefile.am	(revision 5821)
+++ trunk/src/lib/Makefile.am	(revision 5822)
@@ -13,4 +13,5 @@
                             particles/libORXparticles.a \
                             collision_detection/libORXcd.a \
+			    network/libORXnet.a \
                             graphics/spatial_separation/libORXquadtree.a \
                             tinyxml/libtinyxml.a \
@@ -26,4 +27,5 @@
                             particles/libORXparticles.a \
                             collision_detection/libORXcd.a \
+			    network/libORXnet.a \
                             graphics/spatial_separation/libORXquadtree.a \
                             tinyxml/libtinyxml.a \
@@ -72,4 +74,5 @@
           particles \
           collision_detection \
+	  network \
           tinyxml \
           shell \
Index: trunk/src/lib/lang/class_list.cc
===================================================================
--- trunk/src/lib/lang/class_list.cc	(revision 5821)
+++ trunk/src/lib/lang/class_list.cc	(revision 5822)
@@ -28,7 +28,9 @@
 using namespace std;
 
+#ifndef NO_SHELL_COMMAND
 SHELL_COMMAND_STATIC(debug, ClassList, ClassList::debugS)
     ->describe("Shows all registered classes, if param1: is a valid ClassName only values of this class are shown. param2: how much output")
     ->defaultValues(2, NULL, 1);
+#endif
 
 /**
Index: trunk/src/lib/network/Makefile.am
===================================================================
--- trunk/src/lib/network/Makefile.am	(revision 5822)
+++ trunk/src/lib/network/Makefile.am	(revision 5822)
@@ -0,0 +1,23 @@
+MAINSRCDIR=../..
+include $(MAINSRCDIR)/defs/include_paths.am
+
+noinst_LIBRARIES = libORXnet.a
+
+libORXnet_a_SOURCES = synchronizeable.cc \
+		      network_manager.cc \
+		      network_socket.cc \
+		      connection_monitor.cc \
+		      network_stream.cc \
+                      data_stream.cc \
+                      network_protocol.cc
+
+
+
+noinst_HEADERS = synchronizeable.h \
+                 network_manager.h \
+                 network_socket.h \
+                 connection_monitor.h \
+		 network_stream.h \
+                 data_stream.h \
+                 network_protocol.h
+
Index: trunk/src/lib/network/Makefile.in
===================================================================
--- trunk/src/lib/network/Makefile.in	(revision 5822)
+++ trunk/src/lib/network/Makefile.in	(revision 5822)
@@ -0,0 +1,439 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/lib/network
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libORXnet_a_AR = $(AR) $(ARFLAGS)
+libORXnet_a_LIBADD =
+am_libORXnet_a_OBJECTS = synchronizeable.$(OBJEXT) \
+	network_manager.$(OBJEXT) network_socket.$(OBJEXT) \
+	connection_monitor.$(OBJEXT) network_stream.$(OBJEXT) \
+	data_stream.$(OBJEXT) network_protocol.$(OBJEXT)
+libORXnet_a_OBJECTS = $(am_libORXnet_a_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(libORXnet_a_SOURCES)
+DIST_SOURCES = $(libORXnet_a_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG = @DEBUG@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
+DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GPROF = @GPROF@
+GTK2_CFLAGS = @GTK2_CFLAGS@
+GTK2_LIBS = @GTK2_LIBS@
+HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
+HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
+HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
+HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MSBITFIELDS = @MSBITFIELDS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUB_PROJECTS_FALSE = @SUB_PROJECTS_FALSE@
+SUB_PROJECTS_TRUE = @SUB_PROJECTS_TRUE@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+MAINSRCDIR = ../..
+noinst_LIBRARIES = libORXnet.a
+libORXnet_a_SOURCES = synchronizeable.cc \
+		      network_manager.cc \
+		      network_socket.cc \
+		      connection_monitor.cc \
+		      network_stream.cc \
+                      data_stream.cc \
+                      network_protocol.cc
+
+noinst_HEADERS = synchronizeable.h \
+                 network_manager.h \
+                 network_socket.h \
+                 connection_monitor.h \
+		 network_stream.h \
+                 data_stream.h \
+                 network_protocol.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/network/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/lib/network/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libORXnet.a: $(libORXnet_a_OBJECTS) $(libORXnet_a_DEPENDENCIES) 
+	-rm -f libORXnet.a
+	$(libORXnet_a_AR) libORXnet.a $(libORXnet_a_OBJECTS) $(libORXnet_a_LIBADD)
+	$(RANLIB) libORXnet.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection_monitor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_protocol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_socket.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synchronizeable.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-noinstLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-info-am
+
+include $(MAINSRCDIR)/defs/include_paths.am
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: trunk/src/lib/network/README
===================================================================
--- trunk/src/lib/network/README	(revision 5822)
+++ trunk/src/lib/network/README	(revision 5822)
@@ -0,0 +1,16 @@
+
+
+Hi people
+
+Before starting your implementation, please have a look at the 
+./network_monitor.cc
+./network_monitor.h
+files. They are well commented and include everything you will have 
+to use.
+
+For network module information, check out:
+https://www.orxonox.net/cgi-bin/trac.cgi/wiki/NetworkManager
+
+
+
+
Index: trunk/src/lib/network/connection_monitor.cc
===================================================================
--- trunk/src/lib/network/connection_monitor.cc	(revision 5822)
+++ trunk/src/lib/network/connection_monitor.cc	(revision 5822)
@@ -0,0 +1,147 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Silvan Nellen
+   co-programmer: ...
+*/
+
+#include "connection_monitor.h"
+#include <debug.h>
+#include <SDL/SDL.h>
+#include <string.h>
+
+/* using namespace std is default, this needs to be here */
+using namespace std;
+
+ConnectionMonitor::ConnectionMonitor()
+{
+
+  /* set the class id for the base object and add ist to class list*/
+  this->setClassID(CL_CONNECTION_MONITOR, "ConnectionMonitor");
+
+  /*initialize variables*/
+
+  /*Data of the lifetime of the ConnectionMonitor Object*/
+  packetToAverage = 100;
+  protocollType = "default(TCP)";
+
+  startTime= SDL_GetTicks();
+  totalReceivedPackets=0;
+  averageDatarate=0;
+  totalLostPackets=0;
+  totalPacketloss=0;
+
+  /*Data of the current packet*/
+  currentPacketID=0;
+  currentPacketTick=0;
+  lastPacketID=0;
+  lastPacketTick=0;
+  currentDelay=0;
+
+  /*Data of the last n packets (n is specified by paxketsToAverage)*/
+  sizeOfLastFewPackets=0;
+  currentDatarate=0;
+  lastFewDelays = new unsigned int [packetToAverage];
+  lastFewPackets = new byte* [packetToAverage];
+  packetCounter=0;
+
+
+}
+
+
+ConnectionMonitor::~ConnectionMonitor()
+{
+
+
+}
+
+
+
+void ConnectionMonitor::processPacket(byte* currentPacket, unsigned int packetLength)
+{
+  /*Process the current Packet*/
+  currentPacketTick = SDL_GetTicks();
+  currentDelay = currentPacketTick - lastPacketTick;
+
+  /*Do whats needed for Averaging*/
+
+  if(packetCounter == packetToAverage)
+    {
+      computeCurrentDatarate();
+      displayStatistic();
+      packetCounter = 0;
+      sizeOfLastFewPackets = 0;
+    }
+
+  lastFewDelays[packetCounter] = currentDelay;
+  lastFewPackets[packetCounter] = currentPacket;
+  sizeOfLastFewPackets += packetLength;
+
+  /*Update the lifetime Variables*/
+  totalReceivedPackets ++;
+  float timeDiff = this->currentPacketTick - this->startTime;
+  if( timeDiff != 0.0f )
+    averageDatarate = totalReceivedPackets/timeDiff;
+
+  /*Preparefor the next Packet*/
+  lastPacketTick = currentPacketTick;
+  packetCounter++;
+}
+
+
+/* Compute the value of current Datarate*/
+void ConnectionMonitor::computeCurrentDatarate()
+{
+  int timeForLastFewPackets=0;
+  for(int i=0;i < packetToAverage;i++)
+    timeForLastFewPackets += lastFewDelays[i];
+
+  if( timeForLastFewPackets != 0)
+    currentDatarate = sizeOfLastFewPackets/timeForLastFewPackets;
+}
+
+void doUDPRelatedStuff()
+{
+  /*  Do protocol related stuff
+
+  Only for Udp:
+  "currentPacketID = getID from package";
+
+  if(currentPacketID - lastPacketID > 1)
+  {
+  totalLostPackets += currentPacketID - lastPacketID;
+}
+
+  totalPacketloss = (totalLostPackets/totalReceivedPackets)*100 ;
+  */
+}
+
+
+
+/* Display connectoin statistic*/
+void ConnectionMonitor::displayStatistic()
+{
+//   PRINT(0)("============================================\n");
+//   PRINT(0)("Connection Monitor Network Statistics:\n");
+//   PRINT(0)("Total received packets:",totalReceivedPackets);
+//   PRINT(0)("Average datarate :\n",averageDatarate);
+//   PRINT(0)("Total lost packets:",totalLostPackets);
+//   PRINT(0)("Packetloss [%] :\n",totalPacketloss);
+//
+//   PRINT(0)("Current datarate :\n",currentDatarate);
+//   PRINT(0)("Delays of the last few packets :\n");
+//   for(int i=1 ;i <= packetToAverage-1;i++)
+//     PRINT(0)("%i ",lastFewDelays[i]);
+//
+//   PRINT(0)("============================================\n");
+
+}
+
Index: trunk/src/lib/network/connection_monitor.h
===================================================================
--- trunk/src/lib/network/connection_monitor.h	(revision 5822)
+++ trunk/src/lib/network/connection_monitor.h	(revision 5822)
@@ -0,0 +1,54 @@
+/*!
+ * @file connection_monitor.h
+    \brief provides information about the quality of a connection.
+ */
+
+#ifndef _CONNECTION_MONITOR_H
+#define _CONNECTION_MONITOR_H
+
+#include "base_object.h"
+#include "netdefs.h"
+
+class ConnectionMonitor : virtual public BaseObject
+  {
+  public:
+    ConnectionMonitor();
+    ~ConnectionMonitor();
+
+    void                processPacket(byte* packet, unsigned int packetLength);
+
+
+  private:
+
+
+    void                displayStatistic();
+    void                computeCurrentDatarate();
+    void                doUDPRelatedStuff();
+
+    /*Data of the lifetime of the ConnectionMonitor Object*/
+    unsigned int        packetToAverage;
+    char*               protocollType;
+
+    unsigned int        totalReceivedPackets;
+    float               averageDatarate;
+    unsigned int        totalLostPackets;
+    float               totalPacketloss;
+    unsigned int        startTime;
+
+    /*Data of the current packet*/
+    unsigned int        currentPacketID;
+    unsigned int        currentPacketTick;
+    unsigned int        lastPacketID;
+    unsigned int        lastPacketTick;
+    unsigned int        currentDelay;
+
+    /*Data of the last n packets (n is specified by paxketsToAverage)*/
+    unsigned int        sizeOfLastFewPackets;
+    unsigned int        currentDatarate;
+    byte**              lastFewPackets;
+    unsigned int*       lastFewDelays;
+    unsigned int        packetCounter;
+
+  };
+
+#endif
Index: trunk/src/lib/network/data_stream.cc
===================================================================
--- trunk/src/lib/network/data_stream.cc	(revision 5822)
+++ trunk/src/lib/network/data_stream.cc	(revision 5822)
@@ -0,0 +1,125 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Knecht
+   co-programmer: ...
+*/
+
+/* include Data_stream Header */
+#include "data_stream.h"
+
+
+
+
+/* using namespace std is default, this needs to be here */
+using namespace std;
+
+
+
+/**
+ * This is the empty constructor
+ */
+DataStream::DataStream()
+{
+  this->setClassID(CL_DATA_STREAM, "DataStream");
+  this->upBuffer = new byte[DATA_STREAM_BUFFER_SIZE];
+  this->downBuffer = new byte[DATA_STREAM_BUFFER_SIZE];
+}
+
+/**
+ * This constructor creates a new DataStream and connects it to both streams (upStream, downStream)
+ */
+DataStream::DataStream(DataStream& inStream, DataStream& outStream)
+{
+    this->setClassID(CL_DATA_STREAM, "DataStream");
+    this->downStream = &outStream;
+    this->upStream = &inStream;
+
+    if( this->upBuffer)
+      delete[] this->upBuffer;
+    if( this->downBuffer)
+      delete[] this->downBuffer;
+}
+
+/**
+ *  standart deconstructor
+ */
+DataStream::~DataStream()
+{
+
+}
+
+
+/**
+ * This function connects this stream to another stream. The connected DataStream is an up-stream, meaning
+ * that the stream is "further away" from the NetworkSocket. The local reference upStream will be set to this
+ * Stream
+ */
+void DataStream::connectUpStream(DataStream& upStream)
+{
+
+}
+
+/**
+ * This function connects this stream to another stream. The connected DataStream is an down-stream, meaning
+ * that the stream is "closer" to the NetworkSocket.
+ */
+void DataStream::connectDownStream(DataStream& upStream)
+{
+
+}
+
+/**
+ * This function disconnects the upStream and sets it to NULL
+ */
+void DataStream::disconnectUpStream()
+{
+
+}
+
+/**
+ * This function disconnects the downStream and sets it to NULL
+ */
+void DataStream::disconnectDownStream()
+{
+
+}
+
+
+/**
+ * Following functions are protected and only visible inside the object and from derived classes
+ */
+
+/**
+ * This function writes the binary data to the local data. You will have to copy each byte and not only dublicate
+ * it.
+ *
+ * @param data: the binary array
+ * @param length: the length of the array
+ */
+void passDown(byte* data, int length)
+{
+
+}
+
+
+/**
+ * This function returns a reference to the local upData data array. So it can be read by an upper Stream
+ * The reading function will have to copy the whole data and musn't just reference it!
+ * This function is only called from other connected DataStreams to read the data.
+ *
+ * @param data: the binary array
+ * @return: the length of the data
+ */
+int passUp(byte* data)
+{
+
+}
Index: trunk/src/lib/network/data_stream.h
===================================================================
--- trunk/src/lib/network/data_stream.h	(revision 5822)
+++ trunk/src/lib/network/data_stream.h	(revision 5822)
@@ -0,0 +1,48 @@
+/*!
+ * @file data_stream.h
+  *  Main class for a data stream, used for our network stream
+  *  network stream will get data, and will send it with a network socket
+  *  to another network stream
+
+*/
+
+#ifndef _DATA_STREAM_H
+#define _DATA_STREAM_H
+
+#include "base_object.h"
+#include "netdefs.h"
+
+#define DATA_STREAM_BUFFER_SIZE 1024
+
+class DataStream : public BaseObject
+{
+      public:
+      DataStream();
+      DataStream(DataStream& inStream, DataStream& outStream);
+      ~DataStream();
+
+
+      void connectUpStream(DataStream& upStream);
+
+      void disconnectUpStream();
+
+      void connectDownStream(DataStream& downStream);
+
+      void disconnectDownStream();
+
+      virtual void processData() = 0;
+
+      protected:
+      void passDown(byte* data, int length);
+
+      int passUp(byte* data);
+
+      byte* upBuffer;
+      byte* downBuffer;
+      unsigned int bufferSize;
+      DataStream* upStream;
+      DataStream* downStream;
+
+};
+
+#endif /* _DATA_STREAM_ */
Index: trunk/src/lib/network/netdefs.h
===================================================================
--- trunk/src/lib/network/netdefs.h	(revision 5822)
+++ trunk/src/lib/network/netdefs.h	(revision 5822)
@@ -0,0 +1,27 @@
+
+
+/*!
+ * @file network_manager.h
+ *  Main interface for the network module. Manages all the modules
+
+ */
+
+#ifndef _NETDEFS
+#define _NETDEFS
+
+#ifdef HAVE_SDL_NET_H
+  #include <SDL_net.h>
+#else
+  #include <SDL/SDL_net.h>
+#endif
+
+
+typedef unsigned char byte;
+
+
+typedef enum {
+  NET_SERVER,
+  NET_CLIENT
+} NodeType;
+
+#endif /* _NETWORK_MANAGER */
Index: trunk/src/lib/network/network_manager.cc
===================================================================
--- trunk/src/lib/network/network_manager.cc	(revision 5822)
+++ trunk/src/lib/network/network_manager.cc	(revision 5822)
@@ -0,0 +1,168 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+
+/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
+   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
+*/
+#define DEBUG_MODULE_NETWORK
+
+
+#include "network_stream.h"
+#include "class_list.h"
+
+#include "debug.h"
+
+
+/* include your own header */
+#include "network_manager.h"
+
+
+/* using namespace std is default, this needs to be here */
+using namespace std;
+
+
+/************************************
+  What you will see here are the function definitions from the header file (network_manager.h) with doxygen documentation. Here is an example:
+
+
+ In file network_manager.h
+
+ class NetworkManager
+ {
+   int doSomeStuff(float argument, float* pointer);
+ }
+
+ will be implemented in the source file as follows:
+
+ In file network_manager.cc
+
+ / **
+  *  this is the short description for this function: it just does some stuff
+  * @param argument: this is the first argument, stuff...
+  * @param pointer:  this is the pointer to nowhereland
+  * return: whatever the function returns: for example an index, number, etc.
+  * /
+ int NetworkManager::doSomeStuff(float argument, float* pointer)
+ {
+   // whaterver you want to do
+ }
+
+
+ if you want to make automake compile your files: you will want to add the file names to the local Makefile.am
+
+ ************************************/
+
+
+
+/**
+ *  standard constructor
+ */
+NetworkManager::NetworkManager()
+{
+  /* set the class id for the base object */
+  this->setClassID(CL_NETWORK_MANAGER, "NetworkManager");
+
+  /* initialize the references */
+  this->netStreamList = NULL;
+  this->syncList = NULL;
+
+  PRINTF(0)("NetworkManager created\n");
+}
+
+
+/**
+ *  standard deconstructor
+ */
+NetworkManager::~NetworkManager()
+{}
+
+
+/**
+ *  initializes the network manager
+ */
+void NetworkManager::initialize()
+{
+  /* get the synchronizeable list from the class list */
+  this->netStreamList = ClassList::getList(CL_SYNCHRONIZEABLE);
+  PRINTF(0)("NetworkManager initzalized\n");
+}
+
+
+/**
+ *  shutsdown the network manager
+ */
+void NetworkManager::shutdown()
+{
+
+}
+
+
+/**
+ *  creates a connection from one object to a host
+ * @param hostName: the name of the destination host
+ * @param synchronizeable: reference to the sync object
+ */
+NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync)
+{}
+
+
+/**
+ *  creates a connection from one object to a host
+ * @param address: the address of the destination host
+ * @param synchronizeable: reference to the sync object
+ */
+NetworkStream& NetworkManager::establishConnection(IPaddress& address, Synchronizeable& sync)
+{
+  printf("Establish connection to server %s, on port %u\n", SDLNet_ResolveIP(&address), address.port);
+  /* creating a new network stream, it will register itself automaticaly to the class list */
+  NetworkStream* netStream = new NetworkStream(address, sync, NET_CLIENT);
+}
+
+/**
+ *  creates a new NetworkStream of server type
+ * @param sync: the listener
+ */
+NetworkStream& NetworkManager::createServer(Synchronizeable& sync, unsigned int port)
+{
+  PRINTF(0)("Create a new server socket\n");
+  /* creating a new network stream, it will register itself automaticaly to the class list */
+  NetworkStream* netStream = new NetworkStream(port, sync, NET_SERVER);
+}
+
+
+/**
+ *  teardown a connection
+ */
+void NetworkManager::shutdownConnection()
+{
+  PRINTF(0)("Shutdown connection\n");
+}
+
+
+
+/**
+ *  sync the network
+ */
+void NetworkManager::synchronize()
+{
+  if (this->netStreamList != NULL || (this->netStreamList = ClassList::getList(CL_NETWORK_STREAM)) != NULL)
+  {
+    std::list<BaseObject*>::iterator stream;
+    for (stream = this->netStreamList->begin(); stream != this->netStreamList->end(); ++stream)
+      static_cast<NetworkStream*>(*stream)->processData();
+  }
+
+}
Index: trunk/src/lib/network/network_manager.h
===================================================================
--- trunk/src/lib/network/network_manager.h	(revision 5822)
+++ trunk/src/lib/network/network_manager.h	(revision 5822)
@@ -0,0 +1,50 @@
+/*!
+ * @file network_manager.h
+  *  Main interface for the network module. Manages all the modules
+*/
+
+/* you will want to add such a a line at your header file also, since it will
+   prevent c++ from including your code twice*/
+#ifndef _NETWORK_MANGER
+#define _NETWORK_MANAGER
+
+/* include this file, it contains some default definitions */
+#include "netdefs.h"
+
+/* include base_object.h since all classes are derived from this one */
+#include "base_object.h"
+
+
+/* forward declarations for the header file (include the header via #include "bla.h" in the source file) */
+class NetworkStream;
+class Synchronizeable;
+template<typename> class tList;
+
+/* and here is the class itsself*/
+class NetworkManager : public BaseObject
+{
+
+public:
+
+  NetworkManager();
+  ~NetworkManager();
+
+  void initialize();
+  void shutdown();
+
+  NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);
+  NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync);
+  NetworkStream& createServer(Synchronizeable& sync, unsigned int port);
+  void shutdownConnection();
+
+  void synchronize();
+
+private:
+  std::list<BaseObject*>*    netStreamList;            // list with refs to all network streams
+  std::list<BaseObject*>*    syncList;                 // list of synchronizeables
+
+};
+
+
+
+#endif /* _NETWORK_MANAGER */
Index: trunk/src/lib/network/network_protocol.cc
===================================================================
--- trunk/src/lib/network/network_protocol.cc	(revision 5822)
+++ trunk/src/lib/network/network_protocol.cc	(revision 5822)
@@ -0,0 +1,135 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Wuest
+   co-programmer: ...
+*/
+
+/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
+   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
+*/
+#define DEBUG_MODULE_NETWORK
+
+//#include ...
+
+/* include my own header */
+#include "network_protocol.h"
+
+/* include the synchronizeable object */
+#include "synchronizeable.h"
+
+/* include this file for debugging */
+#include "debug.h"
+
+/* using namespace std is default, this needs to be here */
+using namespace std;
+
+
+/**
+  standard constructor
+*/
+NetworkProtocol::NetworkProtocol()
+{
+  /* set the class id for the base object */
+  this->setClassID(CL_NETWORK_PROTOCOL, "NetworkProtocol");
+  this->headerLength = sizeof(Header);
+}
+
+/**
+  standard destructor
+*/
+NetworkProtocol::~NetworkProtocol()
+{}
+
+/**
+    * creates a new packet header from the function arguments
+    *
+    * @arg data: the binary data without header -> return the data in this binary array
+    * @arg length: the data length without header
+    * @arg bufferLength: the length of the internal buffer
+    * @arg source: reference to the source Synchronizeable object
+    * @arg remoteID: id number of the remote Synchronizeable object
+    * @return: the new data length with header (the header data is included into byte* data)
+    *          -1 if there isn't enough space in the buffer for the header
+*/
+int NetworkProtocol::createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source, unsigned int remoteID)
+{
+  printf("NetworkProtocol: create header length = %i, bufferLength = %i\n", length, bufferLength);
+  //If there isn't enough space for the header return -1
+  if (length + this->headerLength > bufferLength)
+    return -1;
+
+//   for(int i = 0; i < length; i++)
+//     printf("send byte[%i]=%u\n", i, data[i]);
+
+
+  //Create space for the header
+  for( int i = length - 1; i >= 0; i--)
+    data[i + this->headerLength] = data[i];
+
+  //Now create the header
+  /* protocol identifier */
+  data[0] = 255;
+  /* version number */
+  data[1] = 0;
+  /* sender ID: FIXME: there will be a better ID (for example unique:D)*/
+  data[2] = (byte)source.getClassID();
+  /* receiver ID */
+  data[3] = remoteID;
+  /* data length*/
+  data[4] = length;
+
+
+  return length + this->headerLength;
+}
+
+/**
+    * extracts the header from the binary data stream
+    * @arg data: the binary data with the header
+    * @arg length: the length of the binary data (including header)
+    * @return: a Header struct with the header information and the binary data
+*/
+Header NetworkProtocol::extractHeader(byte* data, int length)
+{
+  PRINTF(0)("extract Header\n");
+  //Test if received data can contain a header
+  if (length < headerLength)
+  {
+    PRINTF(0)("Received data is to short; it can't contain a header!");
+    Header h;
+    h.protocol = 0;
+    return h;
+  }
+
+  //Extract header
+  Header h;
+  //&h = data;
+
+  h.protocol = data[0];
+  /* version number */
+  h.version = data[1];
+  /* sender ID: FIXME: there will be a better ID (for example unique:D)*/
+  h.senderID = data[2];
+  /* receiver ID */
+  h.receiverID = data[3];
+  /* data length*/
+  h.length = data[4];
+
+
+//   for(int i = 0; i < length; i++)
+//     printf("recS byte[%i]=%u\n", i, data[i]);
+
+  //Remove header
+//   for (int i = headerLength; i < length; i++)
+//     data[i - headerLength] = data[i];
+
+  return h;
+}
Index: trunk/src/lib/network/network_protocol.h
===================================================================
--- trunk/src/lib/network/network_protocol.h	(revision 5822)
+++ trunk/src/lib/network/network_protocol.h	(revision 5822)
@@ -0,0 +1,42 @@
+/*!
+
+*/
+
+#ifndef _NETWORK_PROTOCOL_H
+#define _NETWORK_PROTOCOL_H
+
+#include "base_object.h"
+
+/* include this file, it contains some default definitions */
+#include "netdefs.h"
+
+#define HEADER_LENGTH 1
+
+typedef struct Header
+{
+  byte protocol;
+  byte version;
+  byte senderID;
+  byte receiverID;
+  byte length;
+};
+
+class Synchronizeable;
+
+/*!
+
+*/
+class NetworkProtocol : virtual public BaseObject
+{
+  public:
+    NetworkProtocol();
+    ~NetworkProtocol();
+
+    int createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source, unsigned int remoteID);
+    Header extractHeader(byte* data, int length);
+
+  private:
+    unsigned int headerLength; //The Length of the Header in bytes
+};
+
+#endif //_NETWORK_PROTOCOL_H
Index: trunk/src/lib/network/network_socket.cc
===================================================================
--- trunk/src/lib/network/network_socket.cc	(revision 5822)
+++ trunk/src/lib/network/network_socket.cc	(revision 5822)
@@ -0,0 +1,443 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Christoph Renner, David Hasenfratz
+   co-programmer:
+*/
+
+
+
+/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
+   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
+*/
+#define DEBUG_MODULE_NETWORK
+
+
+/* include your own header */
+#include "network_socket.h"
+
+/* header for debug output */
+#include "debug.h"
+
+
+/**
+ * Default constructor
+ */
+NetworkSocket::NetworkSocket()
+{
+  this->init();
+}
+
+/**
+ * Constructor to connect directly
+ */
+NetworkSocket::NetworkSocket(IPaddress ip)
+{
+  this->init();
+  connectToServer(ip);
+}
+
+
+void NetworkSocket::init()
+{
+  /* set the class id for the base object */
+  this->setClassID(CL_NETWORK_SOCKET, "NetworkSocket");
+
+  tcpSocket = NULL;
+  incomingBufferLength = 0;
+  outgoingBufferLength = 0;
+
+  incomingBufferMutex = SDL_CreateMutex();
+  outgoingBufferMutex = SDL_CreateMutex();
+  socketMutex = SDL_CreateMutex();
+  terminateThread = false;
+
+  /* Init SDL_net */
+  //NOTE: do we need to call SDLNet_Init for all instances?
+  if(SDLNet_Init()==-1)
+  {
+    PRINTF(1)("SDLNet_Init: %s\n", SDLNet_GetError());
+    return;
+  }
+  else
+    PRINTF(5)("SDL_net initialized\n");
+
+  PRINTF(0)("NetworkSocket created\n");
+
+}
+
+/**
+ * Default destructor
+ */
+NetworkSocket::~ NetworkSocket( )
+{
+  /* Quit SDL_net */
+  // NOTE: what if other instances of NetworkSocket running?
+  SDLNet_Quit();
+  PRINTF(5)("SDL_net shutdown\n");
+
+  _isListening = false;
+
+  SDL_DestroyMutex(incomingBufferMutex);
+  SDL_DestroyMutex(outgoingBufferMutex);
+  SDL_DestroyMutex(socketMutex);
+}
+
+/**
+ * This function establishes a TCP/UDP connection to a given server (function argument).
+ * It is called by the NetworkStream. It creates a TCP/UDP socket for the connection.
+ * @param ip
+ */
+void NetworkSocket::connectToServer(IPaddress ip)
+{
+  //check if not already connected or listening
+  if (tcpSocket)
+  {
+    PRINTF(1)("NetworkSocket::listen: tcpSocket!=NULL! maybe you already called listen or connectToServer or did not call disconnectServer()!");
+  }
+
+  /* Connect to the host and port contained in ip using a TCP connection. */
+  tcpSocket = SDLNet_TCP_Open(&ip);
+  if(!tcpSocket)
+  {
+    PRINTF(1)("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+    return;
+  }
+
+  _isListening = false;
+
+  SDL_CreateThread(thread_read, (void*)this);
+  SDL_CreateThread(thread_write, (void*)this);
+}
+
+/**
+ * Tells the NetworkSocket to listen on a specific port for incoming connections.
+ * NetworkSocket::writeBytes(...) will have no effect until there is a valuable connection.
+ * @param port
+ */
+void NetworkSocket::listen(unsigned int port)
+{
+  _isListening = true;
+  //check if not already connected or listening
+  if (tcpSocket)
+  {
+    PRINTF(1)("NetworkSocket::listen: tcpSocket!=NULL! maybe you already called listen or connectToServer or did not call disconnectServer()!\n");
+    _isListening = false;
+    return;
+  }
+
+  IPaddress ip;
+
+  if (SDLNet_ResolveHost(&ip, NULL, port)==-1)
+  {
+    PRINTF(1)("SDLNet_ResolveHost: %s\n", SDLNet_GetError());
+    _isListening = false;
+    return;
+  }
+
+  tcpSocket = SDLNet_TCP_Open(&ip);
+
+  if (!tcpSocket)
+  {
+    PRINTF(1)("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+    _isListening = false;
+    return;
+  }
+
+  SDL_CreateThread(thread_listen, (void*)this);
+  SDL_CreateThread(thread_write, (void*)this);
+}
+
+/**
+ * DTears down a TCP/UDP connection.
+ */
+void NetworkSocket::disconnectServer( )
+{
+  terminateThread = true;
+  /* Close the connection */
+
+  SDL_mutexP(socketMutex);
+  SDLNet_TCP_Close(tcpSocket);
+  tcpSocket = NULL;
+  SDL_mutexV(socketMutex);
+}
+
+
+/**
+ * This function writes some bytes (data) to the network connection (if the connection is already
+ * estabilhed) otherwise it just does nothing (silently discarding the data). And writes some
+ * warnings
+ * @param data: pointer to the data to send
+ * @param length: n bytes to send
+ * @return the number successfully written bytes
+ */
+int NetworkSocket::writeBytes(byte * data, int length)
+{
+  PRINTF(0)("NetworkSocket::writeBytes()\n");
+#ifdef _USE_OUTGOING_BUFFER
+
+  //printf("length=%d, bufsize=%d\n", length, _OUTGOING_BUFFER_SIZE);
+//   if (length>_OUTGOING_BUFFER_SIZE)
+//   {
+//     int res = 0;
+//     int n = length / _OUTGOING_BUFFER_SIZE;
+//     if (length % _OUTGOING_BUFFER_SIZE != 0)
+//       n++;
+// //     printf("n=%d\n", n);
+//     SDL_Delay(500);
+//     for (int i = 0; i<n; i++)
+//     {
+// //       printf("i=%d\n", i);
+//       if (i==n-1)
+//       {
+//         res += writeBytes(data + i*_OUTGOING_BUFFER_SIZE, length-i*_OUTGOING_BUFFER_SIZE);
+// //         printf("res = %d\n", res);
+//       }
+//       else
+//       {
+//         res += writeBytes(data + i*_OUTGOING_BUFFER_SIZE, _OUTGOING_BUFFER_SIZE);
+// //         printf("res = %d\n", res);
+//       }
+//     }
+//     return res;
+//   }
+
+#define min(a,b) (a<b)?a:b
+  int nbytes = min(_OUTGOING_BUFFER_SIZE - outgoingBufferLength, length);
+#undef min
+
+  if (!tcpSocket || data==NULL || nbytes<=0)
+    return 0;
+
+  SDL_mutexP(outgoingBufferMutex);
+
+  memcpy(outgoingBuffer + outgoingBufferLength, data, nbytes);
+  outgoingBufferLength += nbytes;
+
+  SDL_mutexV(outgoingBufferMutex);
+
+
+  return nbytes;
+#else
+  SDL_mutexP(socketMutex);
+
+  if (!tcpSocket || data==NULL)
+    return 0;
+
+  int res = SDLNet_TCP_Send(tcpSocket, data, length);
+
+  SDL_mutexV(socketMutex);
+
+  if (res<length)
+    PRINTF(1)("SDLNet_TCP_Send: %s\n", SDLNet_GetError());
+
+  return res;
+#endif
+}
+
+/**
+ * Reads in the bytes from the network interface and passes it to the NetworkStream.
+ * This function must internaly be implemented/connected as a thread, since the read
+ * functions of many network libraries are blocking an would therefore block the whole
+ * program.
+ * From outside, the thread shouldn't be accessible at all.
+ * @param data: pointer to memory, big enough to store length bytes
+ * @param length: n bytes to read
+ * @return the number successfully read bytes. -1 on error. may be less than length!
+ */
+int NetworkSocket::readBytes(byte * data, int length)
+{
+  if (data==NULL)
+    return 0;
+
+  int nbytes = (length<incomingBufferLength) ? length : incomingBufferLength;
+
+
+  //printf("readBytes: nbytes = %d; length=%d; incomingBufferLength=%d\n", nbytes, length, incomingBufferLength);
+
+  // just in case ...
+  if (nbytes<0)
+    return -1;
+
+  if (nbytes==0)
+      return 0;
+
+  SDL_mutexP(incomingBufferMutex);
+
+  memcpy(data, incomingBuffer, nbytes);
+
+  //important: use memmove because the memory areas may overlap
+  memmove(incomingBuffer, incomingBuffer+nbytes, incomingBufferLength-nbytes);
+  incomingBufferLength -= nbytes;
+
+  SDL_mutexV(incomingBufferMutex);
+
+  return nbytes;
+}
+
+/**
+ * Reads in the bytes form the network interface and passes it to the NetworkStream.
+ * It only reads the bytes if there are enough bytes in our buffer.
+ * @param data: pointer to memory, big enough to store length bytes
+ * @param length: n bytes to read
+ * @return the number successfully read bytes. -1 on error. 0 if there are not enough bytes in our buffer.
+ */
+int NetworkSocket::readBlock(byte * data, int length)
+{
+  printf("NetworkSocket: got %i bytes, NetworkStream requested %i bytes\n", this->incomingBufferLength, length);
+  if (incomingBufferLength >= length)
+    return readBytes(data, length);
+  else return 0;
+}
+
+/**
+ * used to create a thread to listen
+ * will call thrad_read when established connection
+ * @param data: pointer to NetwortSocket
+ */
+int NetworkSocket::thread_listen( void * data )
+{
+  NetworkSocket * self = (NetworkSocket*)data;
+  self->_isListening = true;
+  TCPsocket tempsocket;
+
+  tempsocket = SDLNet_TCP_Accept(self->tcpSocket);
+
+  while (!tempsocket && !self->terminateThread)
+    tempsocket = SDLNet_TCP_Accept(self->tcpSocket);
+
+  SDL_mutexP(self->socketMutex);
+  SDLNet_TCP_Close(self->tcpSocket);
+  self->tcpSocket = NULL;
+
+  if (!tempsocket)
+  {
+    printf("SDLNet_TCP_Accept: %s\n", SDLNet_GetError());
+    //printf("SDLNet_TCP_Accept: %s\n", SDLNet_GetError());
+    SDL_mutexV(self->socketMutex);
+    self->_isListening = false;
+    return -1;
+  }
+
+  self->tcpSocket = tempsocket;
+
+  SDL_mutexV(self->socketMutex);
+
+  self->_isListening = false;
+  return thread_read(data);
+}
+
+/**
+ * used to create a thread to read from socket
+ * @param data: pointer to NetworkSocket
+ */
+int NetworkSocket::thread_read( void * data )
+{
+  int nbytesread = 0;
+  int nbytestoread = 0;
+  char buffer[_LOCAL_BUFFER_SIZE];
+  NetworkSocket * self = (NetworkSocket*)data;
+
+  while (!self->terminateThread)
+  {
+#define min(a,b) (a<b)?a:b
+    nbytestoread = min(_INCOMING_BUFFER_SIZE - self->incomingBufferLength, _LOCAL_BUFFER_SIZE);
+#undef min
+
+    //if buffer is full
+    if (nbytestoread<=0 || self->_isListening)
+    {
+      SDL_Delay(_MSECONDS_SLEEP_FULL_BUFFER);
+      continue;
+    }
+
+    nbytesread = SDLNet_TCP_Recv(self->tcpSocket, buffer, nbytestoread);
+
+    SDL_mutexP(self->incomingBufferMutex);
+
+    if (nbytesread<=0)
+    {
+      printf("SDLNet_TCP_Recv: %s\n", SDLNet_GetError());
+
+      SDL_mutexP(self->socketMutex);
+
+      SDLNet_TCP_Close(self->tcpSocket);
+      self->tcpSocket = NULL;
+
+      SDL_mutexV(self->socketMutex);
+      SDL_mutexV(self->incomingBufferMutex);
+      return -1;
+    }
+
+    //printf("thread_read: nbytesread=%d\n", nbytesread);
+
+    memcpy(self->incomingBuffer+self->incomingBufferLength, buffer, nbytesread);
+    self->incomingBufferLength += nbytesread;
+
+    SDL_mutexV(self->incomingBufferMutex);
+  }
+
+  return 0;
+}
+
+int NetworkSocket::thread_write( void * data )
+{
+  int nbyteswrite = 0;
+  int nbytestowrite = 0;
+  char buffer[_LOCAL_BUFFER_SIZE];
+  NetworkSocket * self = (NetworkSocket*)data;
+
+  while (!self->terminateThread)
+  {
+#define min(a,b) (a<b)?a:b
+    nbytestowrite = min(self->outgoingBufferLength, _LOCAL_BUFFER_SIZE);
+#undef min
+
+//     printf("thread_write nbytes=%d listening=%d\n", nbytestowrite, (int)self->_isListening);
+
+    //if buffer is full
+    if (nbytestowrite<=0 || self->_isListening)
+    {
+      SDL_Delay(_MSECONDS_SLEEP_EMPTY_BUFFER);
+      continue;
+    }
+
+    SDL_mutexP(self->outgoingBufferMutex);
+
+    //printf("a\n");
+
+    memcpy(buffer, self->outgoingBuffer, nbytestowrite);
+    self->outgoingBufferLength -= nbytestowrite;
+    memmove(self->outgoingBuffer, self->outgoingBuffer+nbytestowrite, self->outgoingBufferLength);
+
+    SDL_mutexV(self->outgoingBufferMutex);
+
+    nbyteswrite = SDLNet_TCP_Send(self->tcpSocket, buffer, nbytestowrite);
+
+    if (nbyteswrite<=0)
+    {
+      printf("SDLNet_TCP_Recv: %s\n", SDLNet_GetError());
+
+      SDL_mutexP(self->socketMutex);
+
+      SDLNet_TCP_Close(self->tcpSocket);
+      self->tcpSocket = NULL;
+
+      SDL_mutexV(self->socketMutex);
+      return -1;
+    }
+
+  }
+
+  printf("QUIT WRITE THREAD\n");
+  return 0;
+}
+
Index: trunk/src/lib/network/network_socket.h
===================================================================
--- trunk/src/lib/network/network_socket.h	(revision 5822)
+++ trunk/src/lib/network/network_socket.h	(revision 5822)
@@ -0,0 +1,92 @@
+/*!
+ * @file network_socket.h
+  *  Main interface for the network module. Manages all the modules
+
+*/
+
+#ifndef _NETWORK_SOCKET
+#define _NETWORK_SOCKET
+
+//if you want to use outgoing buffer define _USE_OUTGOING_BUFFER
+#define _USE_OUTGOING_BUFFER
+
+#define _INCOMING_BUFFER_SIZE 10240
+#define _OUTGOING_BUFFER_SIZE 2024000
+#define _LOCAL_BUFFER_SIZE 1024
+//sleep if incoming buffer is full
+#define _MSECONDS_SLEEP_FULL_BUFFER 10
+//sleep if outgoing buffer is empty
+#define _MSECONDS_SLEEP_EMPTY_BUFFER 10
+
+/* contains memmove and memcpy */
+#include <string.h>
+
+#ifdef HAVE_SDL_H
+ #include <SDL_thread.h>
+#else
+ #include <SDL/SDL_thread.h>
+#endif
+/* include this file, it contains some default definitions */
+#include "netdefs.h"
+
+
+/* include base_object.h since all classes are derived from this one */
+#include "base_object.h"
+
+/* using namespace std is default, this needs to be here */
+using namespace std;
+
+class NetworkSocket : public BaseObject
+{
+
+private:
+//  IPaddress serverAddress;
+//  unsigned int port;
+  TCPsocket tcpSocket;
+//  UDPsocket udpSocket;
+
+  byte incomingBuffer[_INCOMING_BUFFER_SIZE];
+#ifdef _USE_OUTGOING_BUFFER
+  byte outgoingBuffer[_OUTGOING_BUFFER_SIZE];
+#endif
+  int incomingBufferLength;
+#ifdef _USE_OUTGOING_BUFFER
+  int outgoingBufferLength;
+#endif
+
+  SDL_mutex * incomingBufferMutex;
+#ifdef _USE_OUTGOING_BUFFER
+  SDL_mutex * outgoingBufferMutex;
+#endif
+  SDL_mutex * socketMutex;
+  bool terminateThread;
+
+  static int thread_listen(void * data);
+  static int thread_read(void * data);
+#ifdef _USE_OUTGOING_BUFFER
+  static int thread_write(void * data);
+#endif
+
+  bool _isListening;
+
+public:
+
+  NetworkSocket();
+  NetworkSocket(IPaddress ip);
+  ~NetworkSocket();
+
+  void connectToServer(IPaddress ip);
+  void listen(unsigned int port);
+  void disconnectServer();
+  int writeBytes(byte * data, int length);
+  int readBytes(byte * data, int length);
+  int readBlock(byte * data, int length);
+
+private:
+  void init();
+
+};
+
+
+
+#endif /* _NETWORK_SOCKET */
Index: trunk/src/lib/network/network_stream.cc
===================================================================
--- trunk/src/lib/network/network_stream.cc	(revision 5822)
+++ trunk/src/lib/network/network_stream.cc	(revision 5822)
@@ -0,0 +1,156 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: claudio
+   co-programmer:
+*/
+
+
+/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
+   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
+*/
+#define DEBUG_MODULE_NETWORK
+
+
+#include "base_object.h"
+#include "network_protocol.h"
+#include "network_socket.h"
+#include "connection_monitor.h"
+#include "synchronizeable.h"
+#include "list.h"
+#include "debug.h"
+
+/* include your own header */
+#include "network_stream.h"
+
+/* probably unnecessary */
+using namespace std;
+
+
+#define PACKAGE_SIZE  256
+
+
+NetworkStream::NetworkStream()
+  : DataStream()
+{
+  this->init();
+  /* initialize the references */
+  this->networkSocket = new NetworkSocket();
+  this->networkProtocol = new NetworkProtocol();
+  this->synchronizeables = NULL;
+  this->connectionMonitor = new ConnectionMonitor();
+}
+
+
+NetworkStream::NetworkStream(IPaddress& address, Synchronizeable& sync, NodeType type)
+  : DataStream()
+{
+  this->init();
+  this->networkSocket = new NetworkSocket(address);
+  this->networkProtocol = new NetworkProtocol();
+  this->synchronizeables = &sync;
+  this->connectionMonitor = new ConnectionMonitor();
+}
+
+
+NetworkStream::NetworkStream(unsigned int port, Synchronizeable& sync, NodeType type)
+  : DataStream()
+{
+  this->init();
+  this->networkSocket = new NetworkSocket();
+  this->networkSocket->listen(port);
+  this->networkProtocol = new NetworkProtocol();
+  this->synchronizeables = &sync;
+  this->connectionMonitor = new ConnectionMonitor();
+}
+
+
+void NetworkStream::init()
+{
+  /* set the class id for the base object */
+  this->setClassID(CL_NETWORK_STREAM, "NetworkStream");
+  this->state = NET_REC_HEADER;
+}
+
+
+NetworkStream::~NetworkStream()
+{
+
+ networkSocket->disconnectServer();
+
+ if( this->networkSocket)
+   delete networkSocket;
+
+ delete connectionMonitor;
+ delete networkProtocol;
+}
+
+void NetworkStream::processData()
+{
+  int dataLength = 0;
+
+  /* DOWNSTREAM */
+  printf("\nSynchronizeable: %s\n", this->synchronizeables->getName());
+  PRINT(0)("============= DOWNSTREAM:===============\n");
+  /* first of all read the synchronizeable's data: */
+  dataLength = this->synchronizeables->readBytes((byte*)downBuffer);
+
+  /* send the received data to connectionMonitor */
+  this->connectionMonitor->processPacket((byte*)downBuffer, dataLength);
+
+  dataLength = this->networkProtocol->createHeader((byte*)downBuffer, dataLength, DATA_STREAM_BUFFER_SIZE,
+      *(this->synchronizeables), 12/* some random number (no real id)*/);
+
+  /* pass the data to the network socket */
+  dataLength = this->networkSocket->writeBytes((byte*)downBuffer, dataLength);
+  /* check if there was an error */
+  if( dataLength == -1) { PRINTF(0)("Error in writing data to the NetworkSocket\n");}
+
+
+
+  /* UPSTREAM */
+  dataLength = 0;
+  PRINT(0)("============== UPSTREAM:================\n");
+  /* first of all read the next Orxonox Network Header */
+
+  if( this->state == NET_REC_HEADER)
+  {
+    dataLength = this->networkSocket->readBlock((byte*)upBuffer, sizeof(Header));
+    if( dataLength == sizeof(Header))
+    {
+      this->packetHeader = this->networkProtocol->extractHeader((byte*) upBuffer , dataLength);
+      printf("NetworkStream::processData() - Got Header: Protocol %u, Version: %u, Sender: %u, Receiver: %u, Length: %u\n",
+             this->packetHeader.protocol, this->packetHeader.version, this->packetHeader.senderID,
+             this->packetHeader.receiverID, this->packetHeader.length);
+      /* FIXME: what if it was no this->packetHeader? catch? eg: the protocol identifier, receiver id*/
+
+      this->state = NET_REC_DATA;
+    }
+  }
+  if( this->state == NET_REC_DATA)
+  {
+    /* now read the data */
+    dataLength = this->networkSocket->readBlock((byte*)upBuffer, this->packetHeader.length);
+    /* check if the data is available and process it if so */
+    if( dataLength == this->packetHeader.length)
+    {
+      printf("NetworkStream::processData() - Got Data: \n");
+      /* send the received data to connectionMonitor */
+      this->connectionMonitor->processPacket((byte*)upBuffer, this->packetHeader.length);
+      /* now pass the data to the sync object */
+      this->synchronizeables->writeBytes((byte*)upBuffer, this->packetHeader.length);
+
+      this->state = NET_REC_HEADER;
+    }
+  }
+
+
+}
Index: trunk/src/lib/network/network_stream.h
===================================================================
--- trunk/src/lib/network/network_stream.h	(revision 5822)
+++ trunk/src/lib/network/network_stream.h	(revision 5822)
@@ -0,0 +1,53 @@
+/*!
+ * @file network_stream.h
+ *  implementation of a network pipe
+ */
+
+#ifndef _NETWORK_STREAM
+#define _NETWORK_STREAM
+
+#include "data_stream.h"
+#include "network_protocol.h"
+
+class Synchronizeable;
+class NetworkSocket;
+class ConnectionMonitor;
+class NetworkProtocol;
+
+
+//<! The state of the NetworkStream
+typedef enum NetStat {
+  NET_REC_HEADER = 0,                          //!< Waiting for header
+  NET_REC_DATA,                                //!< Waiting for data
+
+  NUM_STATES                                   //!< Number of states
+};
+
+
+class NetworkStream : public DataStream
+{
+
+public:
+  NetworkStream();
+  NetworkStream(IPaddress& address, Synchronizeable& sync, NodeType type);
+  NetworkStream(unsigned int port, Synchronizeable& sync, NodeType type);
+  ~NetworkStream();
+
+  void init();
+
+  inline bool isServer() { return (this->type == NET_SERVER)? true:false; }
+  virtual void processData();
+
+private:
+   NetworkProtocol* networkProtocol;
+   //NetworkSocket*       networkSockets;
+   ConnectionMonitor*      connectionMonitor;
+   // tList<Synchronizeable>* synchronizeables;
+   Synchronizeable*         synchronizeables;
+   NetworkSocket* networkSocket;
+   int                    type;
+   int                    state;
+   Header                 packetHeader;
+};
+#endif /* _NETWORK_STREAM */
+
Index: trunk/src/lib/network/synchronisable.cc
===================================================================
--- trunk/src/lib/network/synchronisable.cc	(revision 5821)
+++ 	(revision )
@@ -1,51 +1,0 @@
-
-
-/* 
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Patrick Boenzli
-   co-programmer: ...
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_NETWORK
-
-#include "synchronisable.h"
-
-
-using namespace std;
-
-
-/**
-   \brief constructor for this class
- */
-Synchronisable::Synchronisable () {}
-
-
-/**
-   \brief deconstructor for this class
-*/
-Synchronisable::~Synchronisable () {}
-
-
-/**
-   \brief gets the state of this object
-   \returns the state
-*/
-worldEntityState* Synchronisable::getState()
-{}
-
-
-/**
-   \brief sets the state of this object
-   \param state: the current state
-*/
-void Synchronisable::setState(worldEntityState* state)
-{}
Index: trunk/src/lib/network/synchronisable.h
===================================================================
--- trunk/src/lib/network/synchronisable.h	(revision 5821)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*! 
- * @file synchronisable.h
-    \brief informations about objects, that needs to be synchronized over the network
-
-    this is just an idea, no implementatin yet. but sounds very good to me!
-*/
-
-#ifndef _SYNCHRONISABLE_H
-#define _SYNCHRONISABLE_H
-
-
-
-//! this is a... ehm... i have no idea...
-typedef struct worldEntityState 
-{
-  int    entity;                   //!< probably a entity id? hm...
-};
-
-
-//! an abstract class to handle the synchronisation process
-class Synchronisable {
-
- public:
-  Synchronisable ();
-  ~Synchronisable ();
-
-  worldEntityState* getState();
-  void setState(worldEntityState* state);
-
-  worldentityState state;            //!< the current state of the object
-};
-
-#endif /* _SYNCHRONISABLE_H */
Index: trunk/src/lib/network/synchronizeable.cc
===================================================================
--- trunk/src/lib/network/synchronizeable.cc	(revision 5822)
+++ trunk/src/lib/network/synchronizeable.cc	(revision 5822)
@@ -0,0 +1,52 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+
+### File Specific:
+   main-programmer: Silvan Nellen
+   co-programmer: ...
+*/
+
+#include "synchronizeable.h"
+#include "netdefs.h"
+
+/**
+ *  default constructor
+ */
+Synchronizeable::Synchronizeable(const char* name)
+{
+  this->setName(name);
+}
+
+/**
+ *  default destructor deletes all unneded stuff
+ */
+Synchronizeable::~Synchronizeable()
+{}
+
+/**
+ *  write data to NetworkStream
+ */
+void Synchronizeable::writeBytes(const byte* data, int length)
+{}
+
+/**
+ *  read data from NetworkStream
+ */
+int Synchronizeable::readBytes(byte* data) const
+{}
+
+
+void Synchronizeable::writeDebug() const
+{}
+
+
+void Synchronizeable::readDebug() const
+{}
Index: trunk/src/lib/network/synchronizeable.h
===================================================================
--- trunk/src/lib/network/synchronizeable.h	(revision 5822)
+++ trunk/src/lib/network/synchronizeable.h	(revision 5822)
@@ -0,0 +1,29 @@
+/*!
+ * @file connection_monitor.h
+    \brief interface for all classes that have to be synchronized
+ */
+
+#ifndef _SYNCHRONIZEABLE_H
+#define _SYNCHRONIZEABLE_H
+
+#include <base_object.h>
+#include "netdefs.h"
+
+class Synchronizeable : virtual public BaseObject
+  {
+  public:
+
+    Synchronizeable(const char* name);
+    ~Synchronizeable();
+
+    virtual void      writeBytes(const byte* data, int length);
+    virtual int       readBytes(byte* data) const;
+    virtual void      writeDebug() const;
+    virtual void      readDebug() const;
+
+  private:
+
+    int               uniqueID;
+
+  };
+#endif /* _SYNCHRONIZEABLE_H */
Index: trunk/src/orxonox.cc
===================================================================
--- trunk/src/orxonox.cc	(revision 5821)
+++ trunk/src/orxonox.cc	(revision 5822)
@@ -379,5 +379,5 @@
     {
       if(! strcmp( "--help", argv[i]) || !strcmp("-h", argv[i])) return startHelp(argc, argv);
-      else if(!strcmp( "--benchmark", argv[i]) || !strcmp("-b", argv[i])) return startBenchmarks();
+//      else if(!strcmp( "--benchmark", argv[i]) || !strcmp("-b", argv[i])) return startBenchmarks();
       else if(!strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true;
       //      else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]);
Index: trunk/src/subprojects/Makefile.am
===================================================================
--- trunk/src/subprojects/Makefile.am	(revision 5821)
+++ trunk/src/subprojects/Makefile.am	(revision 5822)
@@ -2,4 +2,5 @@
           particles \
           collision_detection \
+          network \
           testmain
 
Index: trunk/src/subprojects/network/Makefile.am
===================================================================
--- trunk/src/subprojects/network/Makefile.am	(revision 5822)
+++ trunk/src/subprojects/network/Makefile.am	(revision 5822)
@@ -0,0 +1,29 @@
+MAINSRCDIR=../..
+include $(MAINSRCDIR)/defs/include_paths.am
+
+bin_PROGRAMS = network
+
+
+network_CPPFLAGS = -DNO_SHELL -DNO_SHELL_COMMAND
+
+network_LDFLAGS = $(MWINDOWS)
+
+network_LDADD = $(MAINSRCDIR)/lib/network/libORXnet.a \
+                \
+                $(MAINSRCDIR)/lib/tinyxml/libtinyxml.a
+
+network_SOURCES=  network_unit_test.cc \
+                  simple_sync.cc \
+                  \
+                  \
+                  $(MAINSRCDIR)/lib/lang/base_object.cc \
+                  $(MAINSRCDIR)/lib/lang/class_list.cc \
+                  $(MAINSRCDIR)/util/loading/load_param.cc \
+                  $(MAINSRCDIR)/lib/util/substring.cc \
+                  $(MAINSRCDIR)/lib/util/helper_functions.cc 
+
+
+
+noinst_HEADERS  =  network_unit_test.h \
+                   simple_sync.h
+
Index: trunk/src/subprojects/network/Makefile.in
===================================================================
--- trunk/src/subprojects/network/Makefile.in	(revision 5822)
+++ trunk/src/subprojects/network/Makefile.in	(revision 5822)
@@ -0,0 +1,562 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = network$(EXEEXT)
+subdir = src/subprojects/network
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_network_OBJECTS = network-network_unit_test.$(OBJEXT) \
+	network-simple_sync.$(OBJEXT) network-base_object.$(OBJEXT) \
+	network-class_list.$(OBJEXT) network-load_param.$(OBJEXT) \
+	network-substring.$(OBJEXT) network-helper_functions.$(OBJEXT)
+network_OBJECTS = $(am_network_OBJECTS)
+network_DEPENDENCIES = $(MAINSRCDIR)/lib/network/libORXnet.a \
+	$(MAINSRCDIR)/lib/tinyxml/libtinyxml.a
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(network_SOURCES)
+DIST_SOURCES = $(network_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_LIBS = @CURL_LIBS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG = @DEBUG@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
+DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GPROF = @GPROF@
+GTK2_CFLAGS = @GTK2_CFLAGS@
+GTK2_LIBS = @GTK2_LIBS@
+HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
+HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
+HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
+HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MSBITFIELDS = @MSBITFIELDS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUB_PROJECTS_FALSE = @SUB_PROJECTS_FALSE@
+SUB_PROJECTS_TRUE = @SUB_PROJECTS_TRUE@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+MAINSRCDIR = ../..
+network_CPPFLAGS = -DNO_SHELL -DNO_SHELL_COMMAND
+network_LDFLAGS = $(MWINDOWS)
+network_LDADD = $(MAINSRCDIR)/lib/network/libORXnet.a \
+                \
+                $(MAINSRCDIR)/lib/tinyxml/libtinyxml.a
+
+network_SOURCES = network_unit_test.cc \
+                  simple_sync.cc \
+                  \
+                  \
+                  $(MAINSRCDIR)/lib/lang/base_object.cc \
+                  $(MAINSRCDIR)/lib/lang/class_list.cc \
+                  $(MAINSRCDIR)/util/loading/load_param.cc \
+                  $(MAINSRCDIR)/lib/util/substring.cc \
+                  $(MAINSRCDIR)/lib/util/helper_functions.cc 
+
+noinst_HEADERS = network_unit_test.h \
+                   simple_sync.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/network/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/subprojects/network/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+network$(EXEEXT): $(network_OBJECTS) $(network_DEPENDENCIES) 
+	@rm -f network$(EXEEXT)
+	$(CXXLINK) $(network_LDFLAGS) $(network_OBJECTS) $(network_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-base_object.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-class_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-helper_functions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-load_param.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-network_unit_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-simple_sync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-substring.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+network-network_unit_test.o: network_unit_test.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-network_unit_test.o -MD -MP -MF "$(DEPDIR)/network-network_unit_test.Tpo" -c -o network-network_unit_test.o `test -f 'network_unit_test.cc' || echo '$(srcdir)/'`network_unit_test.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-network_unit_test.Tpo" "$(DEPDIR)/network-network_unit_test.Po"; else rm -f "$(DEPDIR)/network-network_unit_test.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='network_unit_test.cc' object='network-network_unit_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-network_unit_test.o `test -f 'network_unit_test.cc' || echo '$(srcdir)/'`network_unit_test.cc
+
+network-network_unit_test.obj: network_unit_test.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-network_unit_test.obj -MD -MP -MF "$(DEPDIR)/network-network_unit_test.Tpo" -c -o network-network_unit_test.obj `if test -f 'network_unit_test.cc'; then $(CYGPATH_W) 'network_unit_test.cc'; else $(CYGPATH_W) '$(srcdir)/network_unit_test.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-network_unit_test.Tpo" "$(DEPDIR)/network-network_unit_test.Po"; else rm -f "$(DEPDIR)/network-network_unit_test.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='network_unit_test.cc' object='network-network_unit_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-network_unit_test.obj `if test -f 'network_unit_test.cc'; then $(CYGPATH_W) 'network_unit_test.cc'; else $(CYGPATH_W) '$(srcdir)/network_unit_test.cc'; fi`
+
+network-simple_sync.o: simple_sync.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-simple_sync.o -MD -MP -MF "$(DEPDIR)/network-simple_sync.Tpo" -c -o network-simple_sync.o `test -f 'simple_sync.cc' || echo '$(srcdir)/'`simple_sync.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-simple_sync.Tpo" "$(DEPDIR)/network-simple_sync.Po"; else rm -f "$(DEPDIR)/network-simple_sync.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='simple_sync.cc' object='network-simple_sync.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-simple_sync.o `test -f 'simple_sync.cc' || echo '$(srcdir)/'`simple_sync.cc
+
+network-simple_sync.obj: simple_sync.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-simple_sync.obj -MD -MP -MF "$(DEPDIR)/network-simple_sync.Tpo" -c -o network-simple_sync.obj `if test -f 'simple_sync.cc'; then $(CYGPATH_W) 'simple_sync.cc'; else $(CYGPATH_W) '$(srcdir)/simple_sync.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-simple_sync.Tpo" "$(DEPDIR)/network-simple_sync.Po"; else rm -f "$(DEPDIR)/network-simple_sync.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='simple_sync.cc' object='network-simple_sync.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-simple_sync.obj `if test -f 'simple_sync.cc'; then $(CYGPATH_W) 'simple_sync.cc'; else $(CYGPATH_W) '$(srcdir)/simple_sync.cc'; fi`
+
+network-base_object.o: $(MAINSRCDIR)/lib/lang/base_object.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-base_object.o -MD -MP -MF "$(DEPDIR)/network-base_object.Tpo" -c -o network-base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-base_object.Tpo" "$(DEPDIR)/network-base_object.Po"; else rm -f "$(DEPDIR)/network-base_object.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='network-base_object.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc
+
+network-base_object.obj: $(MAINSRCDIR)/lib/lang/base_object.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-base_object.obj -MD -MP -MF "$(DEPDIR)/network-base_object.Tpo" -c -o network-base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-base_object.Tpo" "$(DEPDIR)/network-base_object.Po"; else rm -f "$(DEPDIR)/network-base_object.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='network-base_object.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`
+
+network-class_list.o: $(MAINSRCDIR)/lib/lang/class_list.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-class_list.o -MD -MP -MF "$(DEPDIR)/network-class_list.Tpo" -c -o network-class_list.o `test -f '$(MAINSRCDIR)/lib/lang/class_list.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/class_list.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-class_list.Tpo" "$(DEPDIR)/network-class_list.Po"; else rm -f "$(DEPDIR)/network-class_list.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/lang/class_list.cc' object='network-class_list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-class_list.o `test -f '$(MAINSRCDIR)/lib/lang/class_list.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/class_list.cc
+
+network-class_list.obj: $(MAINSRCDIR)/lib/lang/class_list.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-class_list.obj -MD -MP -MF "$(DEPDIR)/network-class_list.Tpo" -c -o network-class_list.obj `if test -f '$(MAINSRCDIR)/lib/lang/class_list.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/class_list.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/class_list.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-class_list.Tpo" "$(DEPDIR)/network-class_list.Po"; else rm -f "$(DEPDIR)/network-class_list.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/lang/class_list.cc' object='network-class_list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-class_list.obj `if test -f '$(MAINSRCDIR)/lib/lang/class_list.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/class_list.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/class_list.cc'; fi`
+
+network-load_param.o: $(MAINSRCDIR)/util/loading/load_param.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-load_param.o -MD -MP -MF "$(DEPDIR)/network-load_param.Tpo" -c -o network-load_param.o `test -f '$(MAINSRCDIR)/util/loading/load_param.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-load_param.Tpo" "$(DEPDIR)/network-load_param.Po"; else rm -f "$(DEPDIR)/network-load_param.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/util/loading/load_param.cc' object='network-load_param.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-load_param.o `test -f '$(MAINSRCDIR)/util/loading/load_param.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param.cc
+
+network-load_param.obj: $(MAINSRCDIR)/util/loading/load_param.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-load_param.obj -MD -MP -MF "$(DEPDIR)/network-load_param.Tpo" -c -o network-load_param.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-load_param.Tpo" "$(DEPDIR)/network-load_param.Po"; else rm -f "$(DEPDIR)/network-load_param.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/util/loading/load_param.cc' object='network-load_param.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-load_param.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param.cc'; fi`
+
+network-substring.o: $(MAINSRCDIR)/lib/util/substring.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-substring.o -MD -MP -MF "$(DEPDIR)/network-substring.Tpo" -c -o network-substring.o `test -f '$(MAINSRCDIR)/lib/util/substring.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/util/substring.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-substring.Tpo" "$(DEPDIR)/network-substring.Po"; else rm -f "$(DEPDIR)/network-substring.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/util/substring.cc' object='network-substring.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-substring.o `test -f '$(MAINSRCDIR)/lib/util/substring.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/util/substring.cc
+
+network-substring.obj: $(MAINSRCDIR)/lib/util/substring.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-substring.obj -MD -MP -MF "$(DEPDIR)/network-substring.Tpo" -c -o network-substring.obj `if test -f '$(MAINSRCDIR)/lib/util/substring.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/util/substring.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/util/substring.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-substring.Tpo" "$(DEPDIR)/network-substring.Po"; else rm -f "$(DEPDIR)/network-substring.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/util/substring.cc' object='network-substring.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-substring.obj `if test -f '$(MAINSRCDIR)/lib/util/substring.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/util/substring.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/util/substring.cc'; fi`
+
+network-helper_functions.o: $(MAINSRCDIR)/lib/util/helper_functions.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-helper_functions.o -MD -MP -MF "$(DEPDIR)/network-helper_functions.Tpo" -c -o network-helper_functions.o `test -f '$(MAINSRCDIR)/lib/util/helper_functions.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/util/helper_functions.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-helper_functions.Tpo" "$(DEPDIR)/network-helper_functions.Po"; else rm -f "$(DEPDIR)/network-helper_functions.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/util/helper_functions.cc' object='network-helper_functions.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-helper_functions.o `test -f '$(MAINSRCDIR)/lib/util/helper_functions.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/util/helper_functions.cc
+
+network-helper_functions.obj: $(MAINSRCDIR)/lib/util/helper_functions.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT network-helper_functions.obj -MD -MP -MF "$(DEPDIR)/network-helper_functions.Tpo" -c -o network-helper_functions.obj `if test -f '$(MAINSRCDIR)/lib/util/helper_functions.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/util/helper_functions.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/util/helper_functions.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/network-helper_functions.Tpo" "$(DEPDIR)/network-helper_functions.Po"; else rm -f "$(DEPDIR)/network-helper_functions.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(MAINSRCDIR)/lib/util/helper_functions.cc' object='network-helper_functions.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(network_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o network-helper_functions.obj `if test -f '$(MAINSRCDIR)/lib/util/helper_functions.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/util/helper_functions.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/util/helper_functions.cc'; fi`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+include $(MAINSRCDIR)/defs/include_paths.am
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: trunk/src/subprojects/network/README
===================================================================
--- trunk/src/subprojects/network/README	(revision 5822)
+++ trunk/src/subprojects/network/README	(revision 5822)
@@ -0,0 +1,21 @@
+
+To use the NetworkUnitTest:
+
+1. Compile and link Orxonox (following the guide you find on www.orxonox.net)
+2. Compile the network binary by typing: make
+
+Now will want to do some of the following:
+
+Distributed Network Test:
+=========================
+1. Start the server: 
+
+./network --server 9999
+
+2. Start the client on an other console/host: 
+
+./network --client dns-name-of-other-host.com 9999
+
+have fun seeing the msgs floating around
+
+
Index: trunk/src/subprojects/network/network_unit_test.cc
===================================================================
--- trunk/src/subprojects/network/network_unit_test.cc	(revision 5822)
+++ trunk/src/subprojects/network/network_unit_test.cc	(revision 5822)
@@ -0,0 +1,273 @@
+
+#include "stdlibincl.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include "shell_buffer.h"
+#include "class_list.h"
+
+#include "network_manager.h"
+#include "network_socket.h"
+#include "network_stream.h"
+#include "synchronizeable.h"
+
+#include "simple_sync.h"
+
+int verbose = 4;
+
+
+/* outputs the help */
+int startHelp(int argc, char** argv)
+{
+  printf("Network is a network unit test\n");
+  printf(" --help                     this output\n");
+  printf(" -st,  --sockettest         test network_socket\n");
+  printf(" -ft,  --frameworktest      test the network module\n");
+  printf(" --server [port number]     creates a test server\n");
+  printf(" --client [address] [port]  connects to a server\n");
+  printf("\n");
+}
+
+
+/* test SDL network socket */
+int testSocket(int argc, char** argv)
+{
+  IPaddress ip;
+  SDLNet_ResolveHost(&ip, "127.0.0.1", 9999);
+  NetworkSocket server;
+  server.listen(9999);
+  SDL_Delay(20);
+
+  NetworkSocket client(ip);
+
+  char buf[1024];
+
+  printf("read from client before sending data\n");
+  printf("result: %d bytes\n", client.readBytes((byte*)buf, 1024));
+
+  printf("read from server before sending data\n");
+  printf("result: %d bytes\n", server.readBytes((byte*)buf, 1024));
+
+  int n;
+  char * str1 = "client to server";
+  char * str2 = "server to client";
+  n = client.writeBytes((byte*)str1, strlen(str1)+1);
+  printf("%d bytes send from client\n", n);
+  n = server.writeBytes((byte*)str2, strlen(str2)+1);
+  printf("%d bytes send from server\n", n);
+  SDL_Delay(1000);
+
+  printf("read from server\n");
+  n = server.readBytes((byte*)buf, 1024);
+  printf("read %d bytes\n", n);
+  if (n<0)
+    return -1;
+
+  printf("data: %s\n", buf);
+  printf("read from client\n");
+  n = client.readBytes((byte*)buf, 1024);
+
+  printf("read %d bytes\n", n);
+  if (n<0)
+    return -1;
+
+  printf("data: %s\n", buf);
+
+  printf("testing a bigger amount of data\n");
+
+#define _N_ELEMENTS 212994
+  char sendbuf[_N_ELEMENTS+1];
+  char recvbuf[_N_ELEMENTS+1];
+  sendbuf[_N_ELEMENTS] = '\0';
+  recvbuf[_N_ELEMENTS] = '\0';
+
+  for (int i = 0; i<_N_ELEMENTS; i++)
+    sendbuf[i] = i%26 + 65;
+
+  printf("write\n");
+  printf("result = %d\n", client.writeBytes((byte*)sendbuf, _N_ELEMENTS));
+
+  SDL_Delay(50);
+
+  printf("read\n");
+  int nbytes = server.readBytes((byte*)recvbuf, _N_ELEMENTS);
+  int offset = nbytes;
+
+  while (nbytes>0)
+  {
+    SDL_Delay(10);
+    //printf("read\n");
+    nbytes = server.readBytes((byte*)recvbuf+offset, _N_ELEMENTS-offset);
+    offset += nbytes;
+    //printf("nbytes=%d, offset=%d\n", nbytes, offset);
+  }
+
+  printf("strcmp = %d (0 is good :D not 0 is evil)\noffset = %d\n", strncmp(sendbuf, recvbuf, _N_ELEMENTS), offset);
+
+  //printf("%s\n%s\n", sendbuf, recvbuf);
+
+  for (int i = 0; i<_N_ELEMENTS; i++)
+  {
+    if (sendbuf[i]!=recvbuf[i])
+    {
+      printf("byte %d is the first difference\n", i+1);
+      break;
+    }
+  }
+
+  return 0;
+}
+
+
+int testFramework(int argc, char** argv)
+{
+  printf("=================\n");
+  printf("TestFramework\n");
+  printf("=================\n");
+
+  Synchronizeable* clientSync = new SimpleSync("Client\0");
+  Synchronizeable* serverSync = new SimpleSync("Server\0");
+
+  unsigned int port = 9999;
+
+  /* create the network manager */
+  NetworkManager* nm = new NetworkManager();
+
+  /* initialize the network manager */
+  nm->initialize();
+
+  /* create a server stream */
+  nm->createServer(*serverSync, port);
+
+  /* esatblish a connection */
+  IPaddress ip;
+  int error = SDLNet_ResolveHost(&ip, "127.0.0.1", port);
+  //SDLNet_ResolveHost(&ip, "localhost", port);
+  if(error == -1) printf("\n\nerror on address resolution, program inconsistancy\n\n");
+  nm->establishConnection(ip, *clientSync);
+  /* adding some break for connection setup */
+  SDL_Delay(20);
+
+  /* synchronize the data 1 time (increment for longer tests) */
+  for( int i = 0; i < 3; i++) {
+    nm->synchronize();
+    /* simulate the network delay */
+    SDL_Delay(50);
+  }
+
+  printf("Test finished\n");
+
+
+  /* delete the network manager again */
+  delete nm;
+
+  delete clientSync;
+  delete serverSync;
+
+  return 0;
+}
+
+
+
+/**
+ *
+ * @param argc
+ * @param argv
+ * @return
+ */
+int startServer(int argc, char** argv)
+{
+  if( argc <= 2) {
+    printf(" Wrong arguments try following notations:\n");
+    printf("   --server [port number]\n");
+    return 0;
+  }
+
+  int port = atoi(argv[2]);
+  printf("Starting Server on port %i\n", port);
+
+  NetworkManager* netMan = new NetworkManager();
+  Synchronizeable* ss = new SimpleSync("Server\0");
+
+  //NetworkStream* server = new NetworkStream(port, ss, NET_SERVER);
+  netMan->createServer(*ss, port);
+  SDL_Delay(20);
+
+  for(;;) {
+    netMan->synchronize();
+    SDL_Delay(500);
+  }
+  return 0;
+}
+
+
+int startClient(int argc, char** argv)
+{
+  if( argc < 3) {
+    printf(" Wrong arguments try following notations:\n");
+    printf("   --client [server ip] [port number]\n");
+    printf("   --server [server name] [port number]\n");
+    return 0;
+  }
+
+  char* name = argv[2];
+  int port = atoi(argv[3]);
+  printf("Connecting to %s, on port %i\n", name, port);
+
+  IPaddress ip;
+  int error = SDLNet_ResolveHost(&ip, name, port);
+  //SDLNet_ResolveHost(&ip, "localhost", port);
+  if(error == -1) printf("\n\nerror on address resolution, program inconsistancy\n\n");
+
+  NetworkManager* netMan = new NetworkManager();
+  Synchronizeable* ss = new SimpleSync("Client\0");
+
+  netMan->establishConnection(ip, *ss);
+
+  for(;;) {
+    netMan->synchronize();
+    SDL_Delay(500);
+  }
+
+  //NetworkStream* client = new NetworkStream(ip, ss, NET_CLIENT);
+
+
+  delete netMan;
+  delete ss;
+
+  return 0;
+}
+
+
+
+/**
+ *
+ *  main function
+ *
+ * here the journey begins
+ */
+int main(int argc, char** argv)
+{
+  int i;
+  // here the pre-arguments are loaded, these are needed to go either to orxonx itself, Help, or Benchmark.
+  for(i = 1; i < argc; ++i)
+  {
+    //else if(!strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true;
+    if (! strcmp( "--sockettest", argv[i]) || !strcmp("-st", argv[i])) return testSocket(argc, argv);
+    else if (! strcmp( "--frameworktest", argv[i]) || !strcmp("-ft", argv[i])) return testFramework(argc, argv);
+    else if (! strcmp( "--server", argv[i]) || !strcmp("-s", argv[i])) return startServer(argc, argv);
+    else if (! strcmp( "--client", argv[i]) || !strcmp("-c", argv[i])) return startClient(argc, argv);
+  }
+
+  startHelp(argc, argv);
+
+  return 0;
+}
+
+
+bool ShellBuffer::addBufferLineStatic(const char* line, ...)
+{
+  //va_list arguments;
+  //vprintf(line, arguments);
+  printf("%s", line);
+
+}
Index: trunk/src/subprojects/network/network_unit_test.h
===================================================================
--- trunk/src/subprojects/network/network_unit_test.h	(revision 5822)
+++ trunk/src/subprojects/network/network_unit_test.h	(revision 5822)
@@ -0,0 +1,24 @@
+/*!
+ * @file network_unit_test.h
+ * A network unit test modules: to test the the network lib without starting orxonox
+ */
+
+/* you will want to add such a a line at your header file also, since it will
+   prevent c++ from including your code twice*/
+#ifndef _NETWORK_UNIT_TEST_H
+#define _NETWORK_UNIT_TEST_H
+
+
+
+class NetworkUnitTest
+{
+  public:
+    NetworkUnitTest();
+    ~NetworkUnitTest();
+
+    void start();
+    void stop();
+
+};
+
+#endif /* _NETWORK_UNIT_TEST */
Index: trunk/src/subprojects/network/simple_sync.cc
===================================================================
--- trunk/src/subprojects/network/simple_sync.cc	(revision 5822)
+++ trunk/src/subprojects/network/simple_sync.cc	(revision 5822)
@@ -0,0 +1,123 @@
+/*
+  orxonox - the future of 3D-vertical-scrollers
+
+  Copyright (C) 2004 orx
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+      the Free Software Foundation; either version 2, or (at your option)
+      any later version.
+
+### File Specific:
+    main-programmer: Patrick Boenzli
+    co-programmer:
+*/
+
+
+/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
+          For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
+*/
+#define DEBUG_MODULE_NETWORK
+
+#include "simple_sync.h"
+
+#include "debug.h"
+
+
+/**
+ *  default constructor
+ */
+SimpleSync::SimpleSync(const char* name)
+  : Synchronizeable(name)
+{
+  /* define the local buffer size */
+  this->outLength = 10;
+  this->recLength = 0;
+  this->inLength = 40;
+  this->outData = new byte[this->outLength];
+  this->inData = new byte[this->inLength];
+
+  /* init the buffer data */
+  for( int i = 0; i < this->outLength; i++)
+  {
+    this->outData[i] = i;
+  }
+  for( int i = 0; i < this->inLength; i++)
+  {
+    this->inData[i] = 0;
+  }
+
+}
+
+
+/**
+ *  default destructor deletes all unneded stuff
+ */
+SimpleSync::~SimpleSync()
+{
+  if( this->outData)
+    delete[] this->outData;
+  if( this->inData)
+    delete[] this->inData;
+}
+
+
+/**
+ *  write data to Synchronizeable
+ */
+void SimpleSync::writeBytes(const byte* data, int length)
+{
+  PRINTF(0)("SimpleSync: got %i bytes of data\n", length);
+  this->recLength = length;
+  if(this->inLength < length)
+    PRINTF(0)("ERROR: local buffer is smaller than the data to receive.\n");
+
+  /* copy the data localy */
+  for( int i = 0; i < length; i++)
+  {
+    this->inData[i] = data[i];
+  }
+  /* and debug output */
+  this->writeDebug();
+}
+
+
+/**
+ *  read data from Synchronizeable
+ */
+int SimpleSync::readBytes(byte* data) const
+{
+  PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength);
+
+  /* debug msg */
+  this->readDebug();
+
+  /* write the test message */
+  for( int i = 0; i < this->outLength; i++)
+    data[i] = this->outData[i];
+
+  /* return the length of the test */
+  return this->outLength;
+}
+
+
+void SimpleSync::writeDebug() const
+{
+  PRINTF(0)("Write in bytes: \t(0 <-) |");
+  for(int i = 0; i < this->recLength; i++)
+  {
+    PRINT(0)(" [%u] ",this->inData[i]);
+  }
+  PRINT(0)("|\n");
+}
+
+
+void SimpleSync::readDebug() const
+{
+  PRINTF(0)("Read out bytes: \t(0 ->) |");
+  for(int i = 0; i < this->outLength; i++)
+  {
+    PRINT(0)(" [%u] ",this->outData[i]);
+  }
+  PRINT(0)("|\n");
+}
Index: trunk/src/subprojects/network/simple_sync.h
===================================================================
--- trunk/src/subprojects/network/simple_sync.h	(revision 5822)
+++ trunk/src/subprojects/network/simple_sync.h	(revision 5822)
@@ -0,0 +1,35 @@
+/*!
+ * @file simple_sync.h
+ *  implementation of a network sync test
+ */
+
+#ifndef _SIMPLE_SYNC
+#define _SIMPLE_SYNC
+
+#include "synchronizeable.h"
+
+
+class SimpleSync : public Synchronizeable
+  {
+  public:
+    SimpleSync(const char* name);
+    ~SimpleSync();
+
+    virtual void writeBytes(const byte* data, int length);
+    virtual int readBytes(byte* data) const;
+
+
+  private:
+    virtual void writeDebug() const;
+    virtual void readDebug() const;
+
+
+  private:
+    byte* inData;
+    int   inLength;
+    int   recLength;
+    byte* outData;
+    int   outLength;
+  };
+
+#endif /* _SIMPLE_SYNC */
