Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/network/data_stream.h @ 6120

Last change on this file since 6120 was 5822, checked in by bensch, 19 years ago

orxonox/trunk: merged branches/network to the trunk
merged with command:
svn merge -r 5505:HEAD branches/network trunk

conflicts resolved in favor of the trunk (as always :))
also fixed a typo in the #include "SDL_tread.h"

File size: 1015 bytes
RevLine 
[5554]1/*!
2 * @file data_stream.h
3  *  Main class for a data stream, used for our network stream
4  *  network stream will get data, and will send it with a network socket
5  *  to another network stream
[5524]6
[5554]7*/
8
9#ifndef _DATA_STREAM_H
10#define _DATA_STREAM_H
11
12#include "base_object.h"
[5562]13#include "netdefs.h"
[5554]14
[5747]15#define DATA_STREAM_BUFFER_SIZE 1024
16
[5554]17class DataStream : public BaseObject
[5524]18{
[5602]19      public:
[5612]20      DataStream();
[5611]21      DataStream(DataStream& inStream, DataStream& outStream);
[5554]22      ~DataStream();
[5569]23
[5747]24
[5562]25      void connectUpStream(DataStream& upStream);
[5569]26
[5562]27      void disconnectUpStream();
[5569]28
[5562]29      void connectDownStream(DataStream& downStream);
[5569]30
[5562]31      void disconnectDownStream();
[5569]32
[5562]33      virtual void processData() = 0;
[5569]34
[5562]35      protected:
[5719]36      void passDown(byte* data, int length);
[5569]37
[5719]38      int passUp(byte* data);
[5722]39
[5808]40      byte* upBuffer;
41      byte* downBuffer;
[5602]42      unsigned int bufferSize;
43      DataStream* upStream;
44      DataStream* downStream;
45
[5562]46};
[5554]47
48#endif /* _DATA_STREAM_ */
Note: See TracBrowser for help on using the repository browser.