Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5723 in orxonox.OLD


Ignore:
Timestamp:
Nov 23, 2005, 2:40:24 PM (18 years ago)
Author:
bottac
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_stream.cc

    r5721 r5723  
    1919*/
    2020#define DEBUG_MODULE_NETWORK
    21 
     21#define PACKAGE_SIZE = 8
    2222
    2323#include "base_object.h"
     
    4343  /* initialize the references */
    4444  this->networkSocket = new NetworkSocket();
    45   this->synchronizeables = new Synchronizeable();
     45  this->synchronizeables = NULL;
    4646  this->connectionMonitor = new ConnectionMonitor();
    4747}
     
    5353  this->init();
    5454  this->networkSocket = new NetworkSocket(/* address, type */);
     55  this->networkSocket->connectToServer(address, 88);
     56
     57  this->synchronizeables = &sync;
    5558}
    5659
     
    6164  this->init();
    6265  this->networkSocket = new NetworkSocket(/* address, type */);
     66 
     67  this->synchronizeables = &sync;
    6368}
    6469
     
    7378NetworkStream::~NetworkStream()
    7479{
     80
     81 networkSocket->disconnectServer();
     82
    7583 delete networkSocket;
    76  delete synchronizeable;
    7784 delete connectionMonitor;
    7885
     
    8289{
    8390
     91 
    8492  int ret = 0;
    85 
    8693 
    8794  byte downData[10];
     
    99106  /* UPSTREAM */
    100107  /* first read 10bytes of data (debug) */
    101   ret = this->networkSocket->readBytes(upData, 0);
     108 //while(ret == 0) { ret = this->networkSocket->readBytes(upData,PACKAGE_SIZE);}
    102109  /* error checking: data read? */
    103110  if( ret != 10) { PRINTF(0)("Error while reading data from the NetworkSocket\n");}
Note: See TracChangeset for help on using the changeset viewer.