… | |
… | |
280 | |
280 | |
281 | sub error { |
281 | sub error { |
282 | my ($self, $msg) = @_; |
282 | my ($self, $msg) = @_; |
283 | |
283 | |
284 | if ($self->{node} && $self->{node}{transport} == $self) { |
284 | if ($self->{node} && $self->{node}{transport} == $self) { |
|
|
285 | $self->{node}->fail (transport_error => $msg); |
285 | $self->{node}->clr_transport; |
286 | $self->{node}->clr_transport; |
286 | } |
287 | } |
287 | $AnyEvent::MP::Base::WARN->("$self->{peerhost}:$self->{peerport}: $msg"); |
288 | $AnyEvent::MP::Base::WARN->("$self->{peerhost}:$self->{peerport}: $msg"); |
288 | $self->destroy; |
289 | $self->destroy; |
289 | } |
290 | } |
… | |
… | |
345 | |
346 | |
346 | The fixed strings are: |
347 | The fixed strings are: |
347 | |
348 | |
348 | =over 4 |
349 | =over 4 |
349 | |
350 | |
350 | =item C<aemp> |
351 | =item protocol identification |
351 | |
352 | |
352 | The constant C<aemp> to identify the protocol. |
353 | The constant C<aemp> to identify the protocol. |
353 | |
354 | |
354 | =item protocol version |
355 | =item protocol version |
355 | |
356 | |
356 | The protocol version supported by this end, currently C<0>. If the |
357 | The protocol version supported by this end, currently C<0>. If the |
357 | versions don't match then no communication is possible. Minor extensions |
358 | versions don't match then no communication is possible. Minor extensions |
358 | are supposed to be handled by addign additional key-value pairs. |
359 | are supposed to be handled through additional key-value pairs. |
359 | |
360 | |
360 | =item a token uniquely identifying the current node instance |
361 | =item a token uniquely identifying the current node instance |
361 | |
362 | |
362 | This is a string that must change between restarts. It usually contains |
363 | This is a string that must change between restarts. It usually contains |
363 | things like the current time, the (OS) process id or similar values, but |
364 | things like the current time, the (OS) process id or similar values, but |
… | |
… | |
513 | > sRG8bbc4TDbkpvH8FTP4HBs87OhepH6VuApoZqXXskuG |
514 | > sRG8bbc4TDbkpvH8FTP4HBs87OhepH6VuApoZqXXskuG |
514 | < aemp;0;nmpKd+gh;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256,cleartext;json,storable;provider=AE-0.0;peeraddr=127.0.0.1:58760 |
515 | < aemp;0;nmpKd+gh;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256,cleartext;json,storable;provider=AE-0.0;peeraddr=127.0.0.1:58760 |
515 | < dCEUcL/LJVSTJcx8byEsOzrwhzJYOq+L3YcopA5T6EAo |
516 | < dCEUcL/LJVSTJcx8byEsOzrwhzJYOq+L3YcopA5T6EAo |
516 | > hmac_md6_64_256;9513d4b258975accfcb2ab7532b83690e9c119a502c612203332a591c7237788;json |
517 | > hmac_md6_64_256;9513d4b258975accfcb2ab7532b83690e9c119a502c612203332a591c7237788;json |
517 | < hmac_md6_64_256;0298d6ba2240faabb2b2e881cf86b97d70a113ca74a87dc006f9f1e9d3010f90;json |
518 | < hmac_md6_64_256;0298d6ba2240faabb2b2e881cf86b97d70a113ca74a87dc006f9f1e9d3010f90;json |
518 | > ["","wkp","pinger","10.0.0.1:4040#nndKd+gn.a","resolved"] |
519 | > ["","lookup","pinger","10.0.0.1:4040#nndKd+gn.a","resolved"] |
519 | |
520 | |
520 | =head1 SEE ALSO |
521 | =head1 SEE ALSO |
521 | |
522 | |
522 | L<AnyEvent>. |
523 | L<AnyEvent>. |
523 | |
524 | |