start stream

git-svn-id: svn://elaine/murooma/trunk@282 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-09-21 07:45:09 +00:00
parent ebfcbf5c26
commit 001bfa6aba
8 changed files with 75 additions and 6 deletions

View file

@ -18,6 +18,7 @@ ServerSession::ServerSession(MessageReceiver* _receiver, std::shared_ptr<tcp::so
void ServerSession::start()
{
active_ = true;
streamActive = false;
readerThread = new thread(&ServerSession::reader, this);
writerThread = new thread(&ServerSession::writer, this);
}
@ -37,7 +38,7 @@ void ServerSession::socketRead(void* _to, size_t _bytes)
void ServerSession::add(shared_ptr<BaseMessage> message)
{
if (!message)
if (!message || !streamActive)
return;
while (messages.size() > 100)// chunk->getDuration() > 10000)