Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6682 was 6341, checked in by bensch, 19 years ago

orxonox/trunk: merged the network branche back to the trunk, so we do not get away from each other to fast

File size: 1016 bytes
Line 
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
6
7*/
8
9#ifndef _DATA_STREAM_H
10#define _DATA_STREAM_H
11
12#include "base_object.h"
13#include "netdefs.h"
14
15#define DATA_STREAM_BUFFER_SIZE 10240
16
17class DataStream : public BaseObject
18{
19      public:
20      DataStream();
21      DataStream(DataStream& inStream, DataStream& outStream);
22      ~DataStream();
23
24
25      void connectUpStream(DataStream& upStream);
26
27      void disconnectUpStream();
28
29      void connectDownStream(DataStream& downStream);
30
31      void disconnectDownStream();
32
33      virtual void processData() = 0;
34
35      protected:
36      void passDown(byte* data, int length);
37
38      int passUp(byte* data);
39
40      byte* upBuffer;
41      byte* downBuffer;
42      unsigned int bufferSize;
43      DataStream* upStream;
44      DataStream* downStream;
45
46};
47
48#endif /* _DATA_STREAM_ */
Note: See TracBrowser for help on using the repository browser.