[svn] commit: r273 - in /branches/f2f200910/src/bin/parkinglot: ccsession.cc ccsession.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Oct 30 23:59:02 UTC 2009
Author: jinmei
Date: Fri Oct 30 23:59:02 2009
New Revision: 273
Log:
make it at least compile
Added:
branches/f2f200910/src/bin/parkinglot/ccsession.h
Modified:
branches/f2f200910/src/bin/parkinglot/ccsession.cc
Modified: branches/f2f200910/src/bin/parkinglot/ccsession.cc
==============================================================================
--- branches/f2f200910/src/bin/parkinglot/ccsession.cc (original)
+++ branches/f2f200910/src/bin/parkinglot/ccsession.cc Fri Oct 30 23:59:02 2009
@@ -28,22 +28,28 @@
using namespace std;
-CommandSession::CommandSession() : session_(ISC::CC::Session()) {
+CommandSession::CommandSession() :
+ session_(ISC::CC::Session())
+{
try {
session_.establish();
session_.subscribe("ParkingLot");
session_.subscribe("Boss");
} catch (...) {
- throw std::runtime_error("CommandSession: failed to open sessions");
+ throw std::runtime_error("SessionManager: failed to open sessions");
}
+}
+
+int
+CommandSession::getSocket()
+{
+ return (session_.getSocket());
}
std::pair<std::string, std::string>
CommandSession::getCommand() {
ISC::Data::ElementPtr cmd, routing, data, ep;
string s;
-
- session.subscribe("statistics");
session_.group_recvmsg(routing, data, false);
cmd = data->get("command");
@@ -61,6 +67,7 @@
return std::pair<string, string>("unknown", "");
}
+#ifdef samplecode
void
handleStatRequest()
{
@@ -78,3 +85,4 @@
session.group_sendmsg(resp, "statistics");
}
}
+#endif
More information about the bind10-changes
mailing list