Permalink
Browse files

为客户端添加可选参数。

运行register.pl时可以指定server。
例:register.pl localhost
  • Loading branch information...
1 parent 5a05a8d commit f5cb3feaaa15be00b9056162d901de6e26f71ed5 Geng Shuang committed Apr 23, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 register.pl
View
@@ -6,8 +6,9 @@
use IO::Select;
use MIME::Base64;
-my $SERVER = 'backup1';
+my $SERVER = @ARGV ? shift : 'backup1';
my $PORT = '8321';
+chomp $SERVER;
my $socket = IO::Socket::INET -> new(
PeerAddr => $SERVER,

0 comments on commit f5cb3fe

Please sign in to comment.