Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5650 in orxonox.OLD for branches/network/src/lib


Ignore:
Timestamp:
Nov 20, 2005, 3:39:38 AM (19 years ago)
Author:
patrick
Message:

network: finished the simple_sync program

Location:
branches/network/src/lib
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXlibs_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/collision_detection/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXcd_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/event/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXevent_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/graphics/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXgraphics_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/graphics/importer/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXimporter_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/graphics/spatial_separation/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXquadtree_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/gui/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
  • branches/network/src/lib/gui/gl_gui/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXglgui_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/gui/gtk_gui/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXgui_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/network/Makefile.in

    r5614 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXnet_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/network/network_stream.cc

    r5649 r5650  
    8585  byte* test = (byte *)data[0]; // obsolete, for debugging only
    8686  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
    91110}
    92111
  • branches/network/src/lib/network/synchronizeable.cc

    r5564 r5650  
    4141                          \brief write data to NetworkStream
    4242 */
    43  void Synchronizeable::writeByteStream(byte* data)
     43 void Synchronizeable::writeBytes(byte* data, int length)
    4444{
    4545
     
    5252                                 \brief read data from NetworkStream
    5353 */
    54  byte* Synchronizeable::readByteStream()
     54 int Synchronizeable::readBytes(byte* data)
    5555{
    5656
  • branches/network/src/lib/network/synchronizeable.h

    r5581 r5650  
    1717                   ~Synchronizeable();
    1818
    19  virtual void      writeByteStream(byte* data);
    20  virtual byte*     readByteStream();
     19 virtual void      writeBytes(byte* data, int length);
     20 virtual int       readBytes(byte* data);
    2121 virtual void      writeDebug();
    2222 virtual void      readDebug();
  • branches/network/src/lib/particles/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXparticles_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/physics/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXphysics_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/shell/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXshell_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/sound/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libORXsound_a_SOURCES)
    1719
    1820srcdir = @srcdir@
  • branches/network/src/lib/tinyxml/Makefile.in

    r5530 r5650  
    1 # Makefile.in generated by automake 1.9.6 from Makefile.am.
     1# Makefile.in generated by automake 1.9.5 from Makefile.am.
    22# @configure_input@
    33
     
    1515@SET_MAKE@
    1616
     17
     18SOURCES = $(libtinyxml_a_SOURCES)
    1719
    1820srcdir = @srcdir@
Note: See TracChangeset for help on using the changeset viewer.