… | |
… | |
19 | |
19 | |
20 | # node configuration: TLS |
20 | # node configuration: TLS |
21 | aemp setcert <file> # set a certificate (key.pem + certificate.pem) |
21 | aemp setcert <file> # set a certificate (key.pem + certificate.pem) |
22 | aemp clrcert # remove certificate |
22 | aemp clrcert # remove certificate |
23 | aemp gencert # generate a random certificate |
23 | aemp gencert # generate a random certificate |
|
|
24 | |
|
|
25 | # node configuration |
|
|
26 | aemp setseeds noderef... # set seednodes |
|
|
27 | aemp addseed noderef # add a seednode |
|
|
28 | aemp delseed noderef # remove seednode |
24 | |
29 | |
25 | =head1 DESCRIPTION |
30 | =head1 DESCRIPTION |
26 | |
31 | |
27 | With aemp you can configure various aspects of AnyEvent::MP and it's protocol. |
32 | With aemp you can configure various aspects of AnyEvent::MP and it's protocol. |
28 | |
33 | |
… | |
… | |
128 | }, |
133 | }, |
129 | clrcert => sub { |
134 | clrcert => sub { |
130 | delete $nodecfg->{cert}; |
135 | delete $nodecfg->{cert}; |
131 | ++$cfg->{dirty}; |
136 | ++$cfg->{dirty}; |
132 | }, |
137 | }, |
|
|
138 | |
|
|
139 | setseeds => sub { |
|
|
140 | $cfg->{seeds} = [@ARGV]; |
|
|
141 | @ARGV = (); |
|
|
142 | ++$cfg->{dirty}; |
|
|
143 | }, |
|
|
144 | addseed => sub { |
|
|
145 | my $seed = shift @ARGV; |
|
|
146 | @{ $cfg->{seeds} } = grep $_ ne $seed, @{ $cfg->{seeds} }; |
|
|
147 | push @{ $cfg->{seeds} }, $seed; |
|
|
148 | ++$cfg->{dirty}; |
|
|
149 | }, |
|
|
150 | addseed => sub { |
|
|
151 | my $seed = shift @ARGV; |
|
|
152 | @{ $cfg->{seeds} } = grep $_ ne $seed, @{ $cfg->{seeds} }; |
|
|
153 | ++$cfg->{dirty}; |
|
|
154 | }, |
133 | ); |
155 | ); |
134 | |
156 | |
135 | sub docmd { |
157 | sub docmd { |
136 | my $cmd = shift @ARGV; |
158 | my $cmd = shift @ARGV; |
137 | |
159 | |