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 */
