summaryrefslogtreecommitdiff
path: root/syncSocket.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-03-14 19:33:40 +0000
committerChristian Pointner <equinox@anytun.org>2008-03-14 19:33:40 +0000
commit8efe1bd45ddab5e60c756c9c11506dfe469e8563 (patch)
treecfb528473cecfda49edadcead130eae46cfce930 /syncSocket.cpp
parentdirty rtp port hack (diff)
first working version
Diffstat (limited to 'syncSocket.cpp')
-rw-r--r--syncSocket.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/syncSocket.cpp b/syncSocket.cpp
index 6681ba3..96da70c 100644
--- a/syncSocket.cpp
+++ b/syncSocket.cpp
@@ -2,6 +2,7 @@
#include <iostream>
#include <string>
#include "routingTable.h"
+#include "rtpSessionTable.h"
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
@@ -54,6 +55,19 @@ void SyncSocket::OnAccept()
Send(lengthout.str());
Send(sout.str());
}
+ //TODO Locking here
+ RtpSessionMap::iterator rit = gRtpSessionTable.getBeginUnlocked();
+ for (;rit!=gRtpSessionTable.getEndUnlocked();++rit)
+ {
+ std::ostringstream sout;
+ boost::archive::text_oarchive oa(sout);
+ const SyncCommand scom(rit->first);
+ oa << scom;
+ std::stringstream lengthout;
+ lengthout << std::setw(5) << std::setfill('0') << sout.str().size()<< ' ';
+ Send(lengthout.str());
+ Send(sout.str());
+ }
}
//void StatusSocket::InitSSLServer()