| 136 | } |
| 137 | |
| 138 | void NetworkClient::StartClient() |
| 139 | { |
| 140 | //Start a TCP server and launch threads |
| 141 | char port_str[6]; |
| 142 | snprintf(port_str, 6, "%d", port_num); |
| 143 | |
| 144 | port.tcp_client(port_ip.c_str(), port_str); |
| 145 | |
| 146 | client_active = true; |
| 147 | |
| 148 | //Start the connection thread |
| 149 | ConnectionThread = new std::thread(&NetworkClient::ConnectionThreadFunction, this); |
| 150 | |
| 151 | /*-------------------------------------------------*\ |
| 152 | | Client info has changed, call the callbacks | |
| 153 | \*-------------------------------------------------*/ |
| 154 | ClientInfoChanged(); |
| 155 | } |
| 156 | |
| 157 | void NetworkClient::StopClient() |
| 158 | { |
no test coverage detected