mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-21 21:40:48 +00:00
Save the connection after it's established so we can actually send messages to it.
This commit is contained in:
parent
ca0023eef6
commit
48ee1419b5
@ -77,6 +77,7 @@ PiggyWebSocketClient::PiggyWebSocketClient(IMessageQueue* messageQueue)
|
||||
rawClient->SetMode(RawWebSocketClient::Mode::PlainText);
|
||||
|
||||
rawClient->SetOpenHandler([this](Connection connection) {
|
||||
this->connection = connection;
|
||||
this->SetState(State::Connected);
|
||||
});
|
||||
|
||||
|
@ -117,7 +117,7 @@ int main(int argc, char* argv[]) {
|
||||
freopen(errorFn.c_str(), "w", stderr);
|
||||
|
||||
auto piggyClient = std::make_shared<PiggyWebSocketClient>(&Window::MessageQueue());
|
||||
piggyClient->Connect("192.168.1.27");
|
||||
piggyClient->Connect("localhost");
|
||||
auto piggyLogger = new PiggyDebugBackend(piggyClient);
|
||||
|
||||
auto fileLogger = new debug::SimpleFileBackend();
|
||||
|
Loading…
x
Reference in New Issue
Block a user