Changeset 26988

Show
Ignore:
Timestamp:
05.03.2013 10:25:42 (7 years ago)
Author:
jmt12
Message:

Replaced hardcoded 'localhost' with hostname as variable

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/bin/script/TDBClient.pl

    r25402 r26988  
    4646 
    4747use SocketsSwimmingThreadPoolClient; 
    48 my $port= shift; 
    49 my $message= shift; 
    50 die "Usage: perl client.pl <port> <string>\n" unless defined($message) && defined($port); 
    51 my $c= SocketsSwimmingThreadPoolClient->new(host=>'localhost', 
     48my $host = shift; 
     49my $port = shift; 
     50my $message = shift; 
     51die "Usage: perl client.pl <host> <port> <string>\n" unless defined($message) && defined($port); 
     52my $c= SocketsSwimmingThreadPoolClient->new(host=>$host, 
    5253                                            port=>$port 
    5354                                           ); 
    54 print "Contacting server on localhost:$port\n"; 
     55print "Contacting server on $host:$port\n"; 
    5556print "Sent: |$message|\n"; 
    5657print "Recv: |" . $c->query($message) . "|\n\n";