Rename mosh to mosh-client and make server message more distinctive

This commit is contained in:
Keith Winstein
2012-02-03 00:23:20 -05:00
parent e20d1169d1
commit ecb45b6d93
3 changed files with 5 additions and 5 deletions
+42
View File
@@ -0,0 +1,42 @@
#include "stmclient.hpp"
#include "crypto.hpp"
#include <iostream>
int main( int argc, char *argv[] )
{
/* Get arguments */
char *ip;
int port;
if ( argc != 3 ) {
fprintf( stderr, "Usage: %s IP PORT\n", argv[ 0 ] );
exit( 1 );
}
ip = argv[ 1 ];
port = myatoi( argv[ 2 ] );
/* Read key from standard input */
cout << "Key: ";
string key;
cin >> key;
/* Adopt native locale */
if ( NULL == setlocale( LC_ALL, "" ) ) {
perror( "setlocale" );
exit( 1 );
}
STMClient client( ip, port, key.c_str() );
client.init();
client.main();
client.shutdown();
printf( "\n[mosh is exiting.]\n" );
return 0;
}