Skip to content

Commit

Permalink
为客户端添加可选参数。
Browse files Browse the repository at this point in the history
运行register.pl时可以指定server。
例:register.pl localhost
  • Loading branch information
Geng Shuang committed Apr 23, 2012
1 parent 5a05a8d commit f5cb3fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion register.pl
Expand Up @@ -6,8 +6,9 @@
use IO::Select; use IO::Select;
use MIME::Base64; use MIME::Base64;


my $SERVER = 'backup1'; my $SERVER = @ARGV ? shift : 'backup1';
my $PORT = '8321'; my $PORT = '8321';
chomp $SERVER;


my $socket = IO::Socket::INET -> new( my $socket = IO::Socket::INET -> new(
PeerAddr => $SERVER, PeerAddr => $SERVER,
Expand Down

0 comments on commit f5cb3fe

Please sign in to comment.