git-svn-id: svn://elaine/murooma/trunk@250 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-09-10 20:07:39 +00:00
parent 7ab33c1bff
commit aff077231e
9 changed files with 256 additions and 148 deletions

View file

@ -16,7 +16,7 @@ Controller::Controller() : MessageReceiver(), active_(false), sampleFormat(NULL)
}
void Controller::onMessageReceived(tcp::socket* socket, const BaseMessage& baseMessage, char* buffer)
void Controller::onMessageReceived(SocketConnection* connection, const BaseMessage& baseMessage, char* buffer)
{
if (baseMessage.type == message_type::payload)
{
@ -56,8 +56,8 @@ void Controller::start(std::string& _ip, size_t _port, int _bufferMs)
{
bufferMs = _bufferMs;
connection = new ServerConnection();
connection->start(this, _ip, _port);
connection = new ClientConnection(this, _ip, _port);
connection->start();
controllerThread = new thread(&Controller::worker, this);
}