Connection: Store the port number as a string

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2013-08-17 05:31:06 -04:00
parent 9187e307c6
commit c1f96b37a1
9 changed files with 22 additions and 23 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ int main( int argc, char *argv[] )
bool server = true;
char *key;
char *ip;
int port;
char *port;
UserStream me, remote;
@@ -59,7 +59,7 @@ int main( int argc, char *argv[] )
key = argv[ 1 ];
ip = argv[ 2 ];
port = atoi( argv[ 3 ] );
port = argv[ 3 ];
n = new Transport<UserStream, UserStream>( me, remote, key, ip, port );
} else {
@@ -70,7 +70,7 @@ int main( int argc, char *argv[] )
exit( 1 );
}
fprintf( stderr, "Port bound is %d, key is %s\n", n->port(), n->get_key().c_str() );
fprintf( stderr, "Port bound is %s, key is %s\n", n->port().c_str(), n->get_key().c_str() );
if ( server ) {
Select &sel = Select::get_instance();