mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-22 19:07:38 +02:00
socket
git-svn-id: svn://elaine/murooma/trunk@250 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
7ab33c1bff
commit
aff077231e
9 changed files with 256 additions and 148 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue