SockIt
|
00001 00010 #ifndef REPLIER_H 00011 #define REPLIER_H 00012 00013 #include <string> 00014 #include <vector> 00015 #include <boost/asio.hpp> 00016 00017 #include "JSAPIAuto.h" 00018 00019 using std::string; 00020 using std::vector; 00021 using std::wstring; 00022 00023 typedef uint16_t byte; 00024 typedef wstring binary; 00025 00029 class Event: public FB::JSAPIAuto 00030 { 00031 public: 00032 00036 Event(); 00037 00041 virtual ~Event(); 00042 00048 virtual void send(const string & data) = 0; 00049 00055 virtual void send_bytes(const vector<byte> & bytes) = 0; 00056 00062 virtual string read() const = 0; 00063 00069 virtual FB::VariantList read_bytes() const = 0; 00070 00075 virtual string get_host() = 0; 00076 00081 virtual unsigned short get_port() = 0; 00082 00086 FB_JSAPI_EVENT(error, 1, (const string &)); 00087 }; 00088 #endif 00089