diff options
author | Christian Pointner <equinox@anytun.org> | 2008-03-14 19:33:40 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-03-14 19:33:40 +0000 |
commit | 8efe1bd45ddab5e60c756c9c11506dfe469e8563 (patch) | |
tree | cfb528473cecfda49edadcead130eae46cfce930 /syncSocket.cpp | |
parent | dirty rtp port hack (diff) |
first working version
Diffstat (limited to 'syncSocket.cpp')
-rw-r--r-- | syncSocket.cpp | 14 |
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() |