diff options
| author | Unknown <azeem@live.ru> | 2018-11-27 20:07:51 +0000 |
|---|---|---|
| committer | Unknown <azeem@live.ru> | 2018-11-27 20:07:51 +0000 |
| commit | 0713c4ebe1e29d1076adb22ba5d8d5e562cecafc (patch) | |
| tree | 92a7405453af6eb42e42f57171437039f706e9c1 /client/client_windows.cpp | |
| parent | f0424e31f233776a93d13caa98a4422385aedcd0 (diff) | |
loader update
Diffstat (limited to 'client/client_windows.cpp')
| -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;
|
