Codec in header message

git-svn-id: svn://elaine/murooma/trunk@286 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-09-21 10:37:14 +00:00
parent a833a00cb1
commit e0a6ac9467
9 changed files with 36 additions and 31 deletions

View file

@ -92,10 +92,8 @@ void ServerSession::add(shared_ptr<BaseMessage> message)
bool ServerSession::send(BaseMessage* message)
{
std::unique_lock<std::mutex> mlock(mutex_);
//cout << "send: " << message->type << ", size: " << message->getSize() << "\n";
if (!connected())
if (!socket)
return false;
//cout << "send: " << message->type << ", size: " << message->getSize() << "\n";
boost::asio::streambuf streambuf;
std::ostream stream(&streambuf);
tv t;