MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / StopClient

Method StopClient

NetworkClient.cpp:157–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void NetworkClient::StopClient()
158{
159 server_connected = false;
160 client_active = false;
161
162 if(server_connected)
163 {
164 shutdown(client_sock, SD_RECEIVE);
165 closesocket(client_sock);
166 }
167
168 client_active = false;
169 server_connected = false;
170
171 if(ListenThread)
172 {
173 ListenThread->join();
174 delete ListenThread;
175 ListenThread = nullptr;
176 }
177 if(ConnectionThread)
178 {
179 ConnectionThread->join();
180 delete ConnectionThread;
181 ConnectionThread = nullptr;
182 }
183
184 /*-------------------------------------------------*\
185 | Client info has changed, call the callbacks |
186 \*-------------------------------------------------*/
187 ClientInfoChanged();
188}
189
190void NetworkClient::ConnectionThreadFunction()
191{

Callers 2

AttemptLocalConnectionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected