00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00024 #ifndef SCALESTACK_ECHO_SERVER_STREAM_H
00025 #define SCALESTACK_ECHO_SERVER_STREAM_H
00026
00027 #include <scalestack/kernel/macros.h>
00028 #include <scalestack/network/stream.h>
00029
00030 namespace scalestack
00031 {
00032 namespace echo
00033 {
00034 namespace server
00035 {
00036
00037 class SCALESTACK_API stream: public network::stream
00038 {
00039 public:
00040
00041 stream(kernel::module& module);
00042
00046 size_t read(uint8_t* buffer, size_t size);
00047
00051 void flush_write(void);
00052
00053 private:
00054
00058 SCALESTACK_LOCAL
00059 stream(const stream&);
00060
00064 SCALESTACK_LOCAL
00065 stream& operator=(const stream&);
00066
00071 SCALESTACK_LOCAL
00072 size_t _echo(void);
00073
00074 size_t _size;
00075 uint8_t* _buffer;
00076 };
00077
00078 }
00079 }
00080 }
00081
00082 #endif