MCPcopy Create free account
hub / github.com/CalcProgrammer1/KeyboardVisualizer / OpenRGBConnect

Method OpenRGBConnect

KeyboardVisualizerCommon/Visualizer.cpp:1365–1384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1363}
1364static bool started = false;
1365NetworkClient * Visualizer::OpenRGBConnect(const char * ip, unsigned short port)
1366{
1367 NetworkClient * rgb_client = new NetworkClient(rgb_controllers);
1368
1369 rgb_client->SetIP(ip);
1370 rgb_client->SetName("Keyboard Visualizer OpenRGB SDK Dev Build");
1371 rgb_client->SetPort(port);
1372
1373 rgb_client->StartClient();
1374
1375 rgb_clients.push_back(rgb_client);
1376
1377 if(!started)
1378 {
1379 LEDUpdateThread = new std::thread(&Visualizer::LEDUpdateThreadFunction, this);
1380 started = true;
1381 }
1382
1383 return(rgb_client);
1384}
1385
1386void Visualizer::OpenRGBDisconnect(NetworkClient * client)
1387{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected