Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10770 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1009 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  ObjectListDeclaration(DataStream);
20  public:
21      DataStream();
22      DataStream(DataStream& inStream, DataStream& outStream);
23      virtual ~DataStream();
24
25
26      void connectUpStream(DataStream& upStream);
27
28      void disconnectUpStream();
29
30      void connectDownStream(DataStream& downStream);
31
32      void disconnectDownStream();
33
34      virtual void processData() = 0;
35
36      protected:
37      void passDown(byte* data, int length);
38
39      int passUp(byte* data);
40
41      byte* upBuffer;
42      byte* downBuffer;
43      unsigned int bufferSize;
44      DataStream* upStream;
45      DataStream* downStream;
46
47};
48
49#endif /* _DATA_STREAM_ */
Note: See TracBrowser for help on using the repository browser.