Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7051 was 6981, checked in by bensch, 19 years ago

trunk: some virtuals

File size: 1.0 KB
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
[6341]15#define DATA_STREAM_BUFFER_SIZE 10240
[5747]16
[5554]17class DataStream : public BaseObject
[5524]18{
[5602]19      public:
[5612]20      DataStream();
[5611]21      DataStream(DataStream& inStream, DataStream& outStream);
[6981]22      virtual ~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.