Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/data_stream.h @ 5569

Last change on this file since 5569 was 5569, checked in by patrick, 19 years ago

network: some very small changes on the DataStream (because I got the UML Diagram wrong), to make it compile under linux

File size: 1.0 KB
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
15class Synchronizeable;
16class NetworkSocket;
17
18class DataStream : public BaseObject
19{
20      DataStream(DataStream& upStream, DataStream& downStream);
21      DataStream(Synchronizeable& sync, NetworkSocket& socket);
22      ~DataStream();
23
24      protected:
25      byte inBuffer [];
26      byte outBuffer [];
27      unsigned int bufferSize;
28      DataStream* upStream;
29      DataStream* downStream;
30
31      public:
32      void connectUpStream(DataStream& upStream);
33
34      void disconnectUpStream();
35
36      void connectDownStream(DataStream& downStream);
37
38      void disconnectDownStream();
39
40      virtual void processData() = 0;
41
42      protected:
43      void write(byte& data);
44
45      byte& read();
46};
47
48#endif /* _DATA_STREAM_ */
Note: See TracBrowser for help on using the repository browser.