FFL
1.0
Finfly Foundation Library
|
00001 /* $Id: protocol.h 2704 2011-12-22 10:26:17Z $ */ 00002 #ifndef _INTERFACE_H_ 00003 #define _INTERFACE_H_ 00004 00005 #include "../ipc/socket.h" 00006 #include <co.h> 00007 00008 namespace ffl 00009 { 00010 00011 namespace cssc 00012 { 00013 00015 class protocol 00016 { 00017 public: 00018 00019 class table_stream:public co_table_transfer 00020 { 00021 ipc::socket *Stream; 00022 00023 void do_write(void *_buf, int _size) 00024 { 00025 Stream->write((const char*)_buf, _size); 00026 } 00027 00028 void do_read(void *_buf, int _size) 00029 { 00030 Stream->read((char*)_buf, _size); 00031 } 00032 00033 public: 00034 00035 table_stream(ipc::socket *_s):Stream(_s){} 00036 }; 00037 00039 // static const unsigned char Version; 00040 00041 }; 00042 00043 } 00044 00045 } 00046 00047 #endif