diff options
Diffstat (limited to 'client')
| -rw-r--r-- | client/client_windows.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/client/client_windows.cpp b/client/client_windows.cpp index 77fb949..02bf78e 100644 --- a/client/client_windows.cpp +++ b/client/client_windows.cpp @@ -37,7 +37,7 @@ // will make not retarded soon.
int main( ) {
// TEMPORARY, WE NEED TO ENCRYPT IP STRING SO WE DON'T HAVE DDOS NOOBS.
- std::string ip = "192.168.0.8";
+ std::string ip = "192.168.0.7";
// std::cin >> ip;
// START.
@@ -48,23 +48,24 @@ int main( ) { if( !c.connect( ) )
return 2;
- c.send_msg( "hello" );
-
auto msg = c.get_string( );
if ( msg != xors( "hello" ) ) {
std::cout << "connection failed." << std::endl;
- return 0;
+ //return 0;
}
+ c.send_msg( "hello" );
+
std::string username{ }, password{ };
std::cout << "Enter your username" << std::endl << "> ";
std::cin >> username;
c.send_msg( username.c_str( ) );
msg = c.get_string( );
+ std::cout <<msg <<std::endl;
if ( msg != xors( "correct username" ) ) {
std::cout << "incorrect username" << std::endl;
- return 0; // remember to close connection on server when bad values were sent.
+ //return 0; // remember to close connection on server when bad values were sent.
}
std::cout << "Enter your password" << std::endl << "> ";
@@ -73,12 +74,12 @@ int main( ) { c.send_msg( password.c_str( ) );
if ( c.get_string( ) != xors( "correct password" ) ) {
std::cout << "incorrect password";
- return 0; // remember to close connection on server when bad values were sent.
+ //return 0; // remember to close connection on server when bad values were sent.
}
-
-
-
+ // Receive list of games,
+ msg = c.get_string( );
+ std::cout << msg << std::endl;
|
