From: Michal Voců Date: Wed, 3 Oct 2007 07:23:46 +0000 (+0000) Subject: some work X-Git-Tag: glite-yaim-myproxy_R_4_0_1_1~7 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=54818533eaa7064983daa153a3a2b2ef7b572f5e;p=jra1mw.git some work --- diff --git a/org.glite.lb.logger/src-nt/InputChannel.cpp b/org.glite.lb.logger/src-nt/InputChannel.cpp index aad201d..e3ac9c8 100644 --- a/org.glite.lb.logger/src-nt/InputChannel.cpp +++ b/org.glite.lb.logger/src-nt/InputChannel.cpp @@ -19,7 +19,7 @@ InputChannel::onReady() // no new data read } else if(msg) { // we have a new message - //theEventManager.postEvent(new NewMessageEvent()); + } else { // still need more data ThreadPool::instance()->queueWorkRead(this); diff --git a/org.glite.lb.logger/src-nt/Message.H b/org.glite.lb.logger/src-nt/Message.H index 4303f14..f9b0f17 100644 --- a/org.glite.lb.logger/src-nt/Message.H +++ b/org.glite.lb.logger/src-nt/Message.H @@ -1,23 +1,46 @@ #ifndef _MESSAGE_H_ #define _MESSAGE_H +#include "Properties.H" + +#include + class Message { public: class ID { public: private: - unsigned char m_uuid[16]; }; + Message(); + Message(void * data, unsigned int length) : m_length(length), m_data(data) {} + + int getContent(void* &data) const + { data = m_data; return m_length; } + + int getContentLength() const + { return m_length; } + + std::string getProperty(const std::string &name, std::string &val) const + { return m_properties.getProperty(name); } + + void setProperty(const std::string &name, std::string &val) + { m_properties.setProperty(name, val); } + + Properties& getProperties() + { return m_properties; } + private: ID m_id; unsigned int m_length; void * m_data; + Properties m_properties; }; + #endif diff --git a/org.glite.lb.logger/src-nt/Transport.H b/org.glite.lb.logger/src-nt/Transport.H index 67ac1ee..1b6516d 100644 --- a/org.glite.lb.logger/src-nt/Transport.H +++ b/org.glite.lb.logger/src-nt/Transport.H @@ -2,7 +2,7 @@ #define _TRANSPORT_H #include "Connection.H" -#include "Properties.H" +#include "Message.H" // Transport implements transport protocol // - reads/writes messages using Connection interface @@ -19,23 +19,6 @@ public: {} }; - - // - class Message { - public: - - Message(); - - int getContent(char* &data) const; - int getContentLength() const; - int getHeader(const char* name, char* &val) const; - Properties& getProperties(); - char *path() const; - - private: - - }; - // Transport() {}