Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5722 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 23, 2005, 2:31:30 PM (19 years ago)
Author:
bknecht
Message:

set BufferSize in DataStream, patched NetworkSocket for SDL

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

Legend:

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

    r5719 r5722  
    2626
    2727/**
    28  * This is the empty construktor
     28 * This is the empty constructor
    2929 */
    3030DataStream::DataStream()
     
    3333}
    3434
    35 
    36 
    37 /**
    38  * This is the empty construktor
    39  */
    40 DataStream::DataStream(Synchronizeable& sync)
    41 {
    42   this->setClassID(CL_DATA_STREAM, "DataStream");
    43   this->synchronizeable = &sync;
    44                        
    45 }
    4635
    4736/**
     
    5342    this->downStream = &outStream;
    5443    this->upStream = &inStream;
    55 }
    56 
    57 /**
    58  * This constructor creates a new DataStream and connects it to a synchronizeable object and the NetworkSocket
    59  */
    60 DataStream::DataStream(Synchronizeable& sync, NetworkSocket& socket)
    61 {
    62     this->setClassID(CL_DATA_STREAM, "DataStream");
    63     this->networkSocket = &socket;
    64 }
    65 
    66 /**
    67  * This constructor creates a new DataStream and connects the Synchronizeable to it
    68  */
    69 DataStream::DataStream(Synchronizeable& sync, DataStream& outStream)
    70 {
    71     this->setClassID(CL_DATA_STREAM, "DataStream");
    72     this->downStream = &outStream;
    73 }
    74 
    75 /**
    76  * This constructor creates a new DataStream and connects the NetworkSocket to it
    77  */
    78 DataStream::DataStream(DataStream& inStream, NetworkSocket& socket)
    79 {
    80      this->setClassID(CL_DATA_STREAM, "DataStream");
    81      this->upStream = &inStream;
    82      this->networkSocket = &socket;
    8344}
    8445
  • branches/network/src/lib/network/data_stream.h

    r5719 r5722  
    5353
    5454      int passUp(byte* data);
    55      
    56       byte inBuffer [];
    57       byte outBuffer [];
     55
     56      byte* upBuffer [1024];
     57      byte* downBuffer [1024];
    5858      unsigned int bufferSize;
    5959      DataStream* upStream;
  • branches/network/src/lib/network/network_socket.h

    r5631 r5722  
    2222#include <string.h>
    2323
    24 #include <SDL_thread.h>
    25 
     24#ifdef HAVE_SDL_H
     25#include <SDL_Thread.h>
     26#else
     27#include <SDL/SDL_thread.h>
     28#endif
    2629/* include this file, it contains some default definitions */
    2730#include "netdefs.h"
Note: See TracChangeset for help on using the changeset viewer.