- Timestamp:
- Nov 20, 2005, 3:39:38 AM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(orxonox_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXlibs_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/collision_detection/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXcd_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/event/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXevent_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/graphics/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXgraphics_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/graphics/importer/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXimporter_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/graphics/spatial_separation/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXquadtree_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/gui/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 -
branches/network/src/lib/gui/gl_gui/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXglgui_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/gui/gtk_gui/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXgui_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/network/Makefile.in
r5614 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXnet_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/network/network_stream.cc
r5649 r5650 85 85 byte* test = (byte *)data[0]; // obsolete, for debugging only 86 86 int ret = 0; 87 this->synchronizeable->writeByteStream(NULL); 88 ret = this->networkSocket->writeBytes(NULL,1); 89 test = this->synchronizeable->readByteStream(); 90 ret = this->networkSocket->readBytes(test,1); 87 88 byte downData[10]; 89 byte upData[10]; 90 91 /* DOWNSTREAM */ 92 /* first of all read the synchronizeable's data: */ 93 ret = this->synchronizeable->readBytes(downData); 94 /* pass the data to the network socket */ 95 ret = this->networkSocket->writeBytes(downData, ret); 96 /* check if there was an error */ 97 if( ret == -1) { PRINTF(0)("Error in writing data to the NetworkSocket\n");} 98 99 100 /* UPSTREAM */ 101 /* first read 10bytes of data (debug) */ 102 ret = this->networkSocket->readBytes(upData, 0); 103 /* error checking: data read? */ 104 if( ret != 10) { PRINTF(0)("Error while reading data from the NetworkSocket\n");} 105 /* now pass the data to the sync object */ 106 this->synchronizeable->writeBytes(upData, 0); 107 108 109 91 110 } 92 111 -
branches/network/src/lib/network/synchronizeable.cc
r5564 r5650 41 41 \brief write data to NetworkStream 42 42 */ 43 void Synchronizeable::writeByte Stream(byte* data)43 void Synchronizeable::writeBytes(byte* data, int length) 44 44 { 45 45 … … 52 52 \brief read data from NetworkStream 53 53 */ 54 byte* Synchronizeable::readByteStream()54 int Synchronizeable::readBytes(byte* data) 55 55 { 56 56 -
branches/network/src/lib/network/synchronizeable.h
r5581 r5650 17 17 ~Synchronizeable(); 18 18 19 virtual void writeByte Stream(byte* data);20 virtual byte* readByteStream();19 virtual void writeBytes(byte* data, int length); 20 virtual int readBytes(byte* data); 21 21 virtual void writeDebug(); 22 22 virtual void readDebug(); -
branches/network/src/lib/particles/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXparticles_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/physics/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXphysics_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/shell/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXshell_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/sound/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXsound_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/lib/tinyxml/Makefile.in
r5530 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libtinyxml_a_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/subprojects/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 -
branches/network/src/subprojects/collision_detection/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(collision_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/subprojects/importer/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 14 14 15 15 @SET_MAKE@ 16 17 SOURCES = $(importer_SOURCES) 16 18 17 19 srcdir = @srcdir@ -
branches/network/src/subprojects/network/Makefile.am
r5649 r5650 14 14 15 15 network_SOURCES= network_unit_test.cc \ 16 simple_sync.cc \ 16 17 \ 17 18 \ … … 24 25 25 26 26 noinst_HEADERS = network_unit_test.h 27 noinst_HEADERS = network_unit_test.h \ 28 simple_sync.h 27 29 -
branches/network/src/subprojects/network/Makefile.in
r5619 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(network_SOURCES) 17 19 18 20 srcdir = @srcdir@ … … 54 56 PROGRAMS = $(bin_PROGRAMS) 55 57 am_network_OBJECTS = network-network_unit_test.$(OBJEXT) \ 56 network- base_object.$(OBJEXT) network-class_list.$(OBJEXT) \57 network- load_param.$(OBJEXT) network-substring.$(OBJEXT) \58 network- helper_functions.$(OBJEXT)58 network-simple_sync.$(OBJEXT) network-base_object.$(OBJEXT) \ 59 network-class_list.$(OBJEXT) network-load_param.$(OBJEXT) \ 60 network-substring.$(OBJEXT) network-helper_functions.$(OBJEXT) 59 61 network_OBJECTS = $(am_network_OBJECTS) 60 62 network_DEPENDENCIES = $(MAINSRCDIR)/lib/network/libORXnet.a \ … … 192 194 193 195 network_SOURCES = network_unit_test.cc \ 196 simple_sync.cc \ 194 197 \ 195 198 \ … … 198 201 $(MAINSRCDIR)/util/loading/load_param.cc \ 199 202 $(MAINSRCDIR)/lib/util/substring.cc \ 200 $(MAINSRCDIR)/lib/util/helper_functions.cc 201 202 noinst_HEADERS = network_unit_test.h 203 $(MAINSRCDIR)/lib/util/helper_functions.cc 204 205 noinst_HEADERS = network_unit_test.h \ 206 simple_sync.h 207 203 208 all: all-am 204 209 … … 272 277 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-load_param.Po@am__quote@ 273 278 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-network_unit_test.Po@am__quote@ 279 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-simple_sync.Po@am__quote@ 274 280 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-substring.Po@am__quote@ 275 281 … … 301 307 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 302 308 @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` 309 310 network-simple_sync.o: simple_sync.cc 311 @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; \ 312 @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 313 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='simple_sync.cc' object='network-simple_sync.o' libtool=no @AMDEPBACKSLASH@ 314 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 315 @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 316 317 network-simple_sync.obj: simple_sync.cc 318 @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`; \ 319 @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 320 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='simple_sync.cc' object='network-simple_sync.obj' libtool=no @AMDEPBACKSLASH@ 321 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 322 @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` 303 323 304 324 network-base_object.o: $(MAINSRCDIR)/lib/lang/base_object.cc -
branches/network/src/subprojects/network/network_unit_test.cc
r5649 r5650 10 10 #include "network_stream.h" 11 11 #include "synchronizeable.h" 12 13 #include "simple_sync.h" 12 14 13 15 int verbose = 4; … … 123 125 //SDLNet_ResolveHost(&ip, "127.0.0.1", 9999); 124 126 SDLNet_ResolveHost(&ip, "localhost", 9999); 125 Synchronizeable sync; 127 Synchronizeable* clientSync = new SimpleSync(); 128 Synchronizeable* serverSync = new SimpleSync(); 129 126 130 127 131 … … 133 137 134 138 /* create a server stream */ 135 nm->createServer( sync, 9999);139 nm->createServer(*serverSync, 9999); 136 140 137 141 /* esatblish a connection */ 138 nm->establishConnection(ip, sync);142 nm->establishConnection(ip, *clientSync); 139 143 140 144 /* synchronize the data 1 time (increment for longer tests) */ -
branches/network/src/subprojects/network/simple_sync.cc
r5649 r5650 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific: 12 main-programmer: Patrick Boenzli 13 co-programmer: 14 */ 15 16 17 /* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module 18 For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput 19 */ 20 #define DEBUG_MODULE_NETWORK 21 22 #include "simple_sync.h" 23 24 #include "debug.h" 25 26 /** 27 * default constructor 28 */ 29 SimpleSync::SimpleSync() 30 : Synchronizeable() 31 { 32 this->outLength = 10; 33 this->inLength = 0; 34 this->outData = new byte[this->outLength]; 35 36 for( int i = 0; i < this->outLength; i++) 37 { 38 this->outData[i] = i; 39 } 40 } 41 42 /** 43 * default destructor deletes all unneded stuff 44 */ 45 SimpleSync::~SimpleSync() 46 { 47 } 48 49 /** 50 * write data to NetworkStream 51 */ 52 void SimpleSync::writeBytes(byte* data, int length) 53 { 54 /* copy the data localy */ 55 this->inLength = length; 56 for(int i = 0; i < length; i++) 57 { 58 this->inData[i] = data[i]; 59 } 60 /* and debug output */ 61 this->writeDebug(); 62 } 63 64 65 /** 66 * read data from NetworkStream 67 */ 68 int SimpleSync::readBytes(byte* data) 69 { 70 /* write the test message */ 71 data = this->outData; 72 /* debug msg */ 73 this->readDebug(); 74 /* return the length of the test */ 75 return this->outLength; 76 } 77 78 void SimpleSync::writeDebug() 79 { 80 PRINTF(0)("Write in: |"); 81 for(int i = 0; i < inLength; i++) 82 { 83 PRINT(0)(" %i ",this->inData[i]); 84 } 85 PRINT(0)("|\n"); 86 } 87 88 void SimpleSync::readDebug() 89 { 90 PRINTF(0)("Read out: |"); 91 for(int i = 0; i < outLength; i++) 92 { 93 PRINT(0)(" %i ",this->outData[i]); 94 } 95 PRINT(0)("|\n"); 96 } -
branches/network/src/subprojects/network/simple_sync.h
r5649 r5650 1 /*! 2 * @file simple_sync.h 3 * implementation of a network sync test 4 */ 5 6 #ifndef _SIMPLE_SYNC 7 #define _SIMPLE_SYNC 8 9 #include "synchronizeable.h" 10 11 12 class SimpleSync : public Synchronizeable 13 { 14 public: 15 SimpleSync(); 16 ~SimpleSync(); 17 18 virtual void writeBytes(byte* data, int length); 19 virtual int readBytes(byte* data); 20 21 private: 22 virtual void writeDebug(); 23 virtual void readDebug(); 24 25 26 private: 27 byte* inData; 28 int inLength; 29 byte* outData; 30 int outLength; 31 }; 32 33 #endif /* _SIMPLE_SYNC */ 34 -
branches/network/src/subprojects/particles/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 14 14 15 15 @SET_MAKE@ 16 17 SOURCES = $(particles_SOURCES) 16 18 17 19 srcdir = @srcdir@ -
branches/network/src/subprojects/testmain/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(testmain_SOURCES) 17 19 18 20 srcdir = @srcdir@ -
branches/network/src/util/Makefile.in
r5580 r5650 1 # Makefile.in generated by automake 1.9. 6from Makefile.am.1 # Makefile.in generated by automake 1.9.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 15 15 @SET_MAKE@ 16 16 17 18 SOURCES = $(libORXutils_a_SOURCES) 17 19 18 20 srcdir = @srcdir@
Note: See TracChangeset
for help on using the changeset viewer.