We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bfa71e commit 2e261b9Copy full SHA for 2e261b9
client.h
@@ -43,5 +43,3 @@ class client
43
char request[max_length] = {0};
44
size_t request_length;
45
};
46
-
47
main_client.cpp
@@ -30,11 +30,17 @@ int main(void)
30
int port = boost::lexical_cast<int>(result_vect[1].c_str());
31
if (port > 0 && port < 65536)
32
{
33
- client.ConnectToServer(
34
- result_vect[0], // host
35
- result_vect[1] // port
36
- );
37
- connected = true;
+ if (!connected)
+ {
+ client.ConnectToServer(
+ result_vect[0], // host
+ result_vect[1] // port
38
+ );
39
+ connected = true;
40
+ }
41
+ else {
42
+ out << "\tYou are connected to server!" << "\n";
}
else
0 commit comments