… | |
… | |
78 | C<set> prefix. |
78 | C<set> prefix. |
79 | |
79 | |
80 | =head2 RUNNING A NODE |
80 | =head2 RUNNING A NODE |
81 | |
81 | |
82 | This can be used to run a node - together with some services, this makes |
82 | This can be used to run a node - together with some services, this makes |
83 | it unnecesary to write any wrapper programs. |
83 | it unnecessary to write any wrapper programs. |
84 | |
84 | |
85 | =over 4 |
85 | =over 4 |
86 | |
86 | |
87 | =item run <configure_args>... |
87 | =item run <configure_args>... |
88 | |
88 | |
… | |
… | |
105 | =back |
105 | =back |
106 | |
106 | |
107 | =head2 PROTOCOL COMMANDS |
107 | =head2 PROTOCOL COMMANDS |
108 | |
108 | |
109 | These commands actually communicate with other nodes. They all use a node |
109 | These commands actually communicate with other nodes. They all use a node |
110 | profile name of C<aemp> (specifying a dfeault node ID of C<anon/> and a |
110 | profile name of C<aemp> (specifying a default node ID of C<anon/> and a |
111 | binds list containing C<*:*> only). |
111 | binds list containing C<*:*> only). |
112 | |
112 | |
113 | They all use a timeout of five seconds, after which they give up. |
113 | They all use a timeout of five seconds, after which they give up. |
114 | |
114 | |
115 | =over 4 |
115 | =over 4 |
… | |
… | |
119 | Simply send a message to the given port - where you get the port ID from |
119 | Simply send a message to the given port - where you get the port ID from |
120 | is your problem. |
120 | is your problem. |
121 | |
121 | |
122 | Exits after ensuring that the message has been delivered to its node. |
122 | Exits after ensuring that the message has been delivered to its node. |
123 | |
123 | |
124 | Most useful to take avdantage of some undocumented functionality inside |
124 | Most useful to take advantage of some undocumented functionality inside |
125 | nodes, such as node ports being able to call any method: |
125 | nodes, such as node ports being able to call any method: |
126 | |
126 | |
127 | aemp snd doomed AnyEvent::Watchdog::restart 1 |
127 | aemp snd doomed AnyEvent::Watchdog::restart 1 |
128 | |
128 | |
129 | =item rpc <port> <arg...> |
129 | =item rpc <port> <arg...> |
… | |
… | |
132 | for a message to it. |
132 | for a message to it. |
133 | |
133 | |
134 | Any return values will be JSON-encoded and printed separated by commas |
134 | Any return values will be JSON-encoded and printed separated by commas |
135 | (kind of like a JSON array without []-brackets). |
135 | (kind of like a JSON array without []-brackets). |
136 | |
136 | |
137 | Example: ask the (undocumented) time service of a node for it'S current |
137 | Example: ask the (undocumented) time service of a node for it's current |
138 | time. |
138 | time. |
139 | |
139 | |
140 | aemp rpc mynode time |
140 | aemp rpc mynode time |
141 | |
141 | |
142 | =item mon <port> |
142 | =item mon <port> |
… | |
… | |
194 | Removes the shared secret again, which means it is inherited again from |
194 | Removes the shared secret again, which means it is inherited again from |
195 | it's parent profile, or stays unset. |
195 | it's parent profile, or stays unset. |
196 | |
196 | |
197 | =item gencert |
197 | =item gencert |
198 | |
198 | |
199 | Generates a self-signed certficate and key, and sets it. This works |
199 | Generates a self-signed certificate and key, and sets it. This works |
200 | similarly to a shared secret: when all nodes have it, TLS will be used to |
200 | similarly to a shared secret: when all nodes have it, TLS will be used to |
201 | authenticate and encrypt all traffic. |
201 | authenticate and encrypt all traffic. |
202 | |
202 | |
203 | =item setcert <file> |
203 | =item setcert <file> |
204 | |
204 | |