compatido: cleanup idosocket build, works now with conninfo db hello handshake, still TODO

This commit is contained in:
Michael Friedrich 2012-09-15 14:59:55 +02:00
parent 2c9ac33a32
commit 340a0583bf
2 changed files with 19 additions and 17 deletions

View File

@ -4,9 +4,11 @@ pkglib_LTLIBRARIES = \
compatido.la
compatido_la_SOURCES = \
i2-compatido.h \
idosocket.cpp \
idosocket.h \
compatidocomponent.cpp \
compatidocomponent.h \
i2-compatido.h
compatidocomponent.h
compatido_la_CPPFLAGS = \
$(BOOST_CPPFLAGS) \

View File

@ -50,7 +50,7 @@ void IdoSocket::SendMessage(const String& message)
* as we inherit all the functionality
* of the tcpclient class
*/
Write(message, message.size());
Write(message.CStr(), message.GetLength());
}
/**
@ -59,23 +59,23 @@ void IdoSocket::SendMessage(const String& message)
*/
void IdoSocket::DataAvailableHandler(void)
{
for (;;) {
string sString;
String sString;
{
mutex::scoped_lock lock(GetMutex());
while (NetString::ReadStringFromIOQueue(this, &sString)) {
//std::cerr << "<< " << jsonString << std::endl;
if (!Netstring::ReadStringFromFIFO(GetRecvQueue(), &sString))
return;
}
try {
// Value value = Value::Deserialize(jsonString);
// if (!value.IsObjectType<Dictionary>())
// throw_exception(invalid_argument("JSON-RPC message must be a dictionary."));
// OnNewMessage(GetSelf(), MessagePart(value));
} catch (const exception& ex) {
Logger::Write(LogCritical, "jsonrpc", "Exception while processing message from JSON-RPC client: " + String(ex.what()));
}
}
try {
//message = MessagePart(jsonString);
//OnNewMessage(GetSelf(), message);
} catch (const exception& ex) {
Logger::Write(LogCritical, "idosocket", "Exception while processing message from idosocket client: " + string(ex.what()));
}
}
}
/**