ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Transport.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Transport.pm (file contents):
Revision 1.15 by root, Tue Aug 4 07:47:29 2009 UTC vs.
Revision 1.16 by root, Tue Aug 4 07:50:52 2009 UTC

326The greeting consists of two text lines that are ended by either an ASCII 326The greeting consists of two text lines that are ended by either an ASCII
327CR LF pair, or a single ASCII LF (recommended). 327CR LF pair, or a single ASCII LF (recommended).
328 328
329=head2 GREETING 329=head2 GREETING
330 330
331All the lines until after authentication must not exceed 4kb in length,
332including delimiter. Afterwards there is no limit on the packet size that
333can be received.
334
335=head3 First Greeting Line
336
337Example:
338
339 aemp;0;fec.4a7720fc;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256;json,storable;provider=AE-0.0
340
331The first line contains strings separated (not ended) by C<;> 341The first line contains strings separated (not ended) by C<;>
332characters. The first even ixtrings are fixed by the protocol, the 342characters. The first even ixtrings are fixed by the protocol, the
333remaining strings are C<KEY=VALUE> pairs. None of them may contain C<;> 343remaining strings are C<KEY=VALUE> pairs. None of them may contain C<;>
334characters themselves. 344characters themselves.
335
336All the lines until after authentication must not exceed 4kb in length,
337including delimiter. Afterwards there is no limit on the packet size that
338can be received.
339
340=head3 First Greeting Line
341 345
342The fixed strings are: 346The fixed strings are:
343 347
344=over 4 348=over 4
345 349
412characters. 416characters.
413 417
414I<< The two nonces B<must> be different, and an aemp implementation 418I<< The two nonces B<must> be different, and an aemp implementation
415B<must> check and fail when they are identical >>. 419B<must> check and fail when they are identical >>.
416 420
417Example of the two lines of greeting: 421Example of a nonce line:
418 422
419 aemp;0;fec.4a7720fc;127.0.0.1:1235,[::1]:1235;hmac_md6_64_256;json,storable;provider=AE-0.0
420 p/I122ql7kJR8lumW3lXlXCeBnyDAvz8NQo3x5IFowE4 423 p/I122ql7kJR8lumW3lXlXCeBnyDAvz8NQo3x5IFowE4
421 424
422=head2 TLS handshake 425=head2 TLS handshake
423 426
424I<< If, after the handshake, both sides indicate interest in TLS, then the 427I<< If, after the handshake, both sides indicate interest in TLS, then the
489This must be one of the framing protocols offered by the other side in the 492This must be one of the framing protocols offered by the other side in the
490greeting. Each side must accept the choice of the other side. 493greeting. Each side must accept the choice of the other side.
491 494
492=back 495=back
493 496
494Example: 497Example of an authentication reply:
495 498
496 hmac_md6_64_256;363d5175df38bd9eaddd3f6ca18aa1c0c4aa22f0da245ac638d048398c26b8d3;json 499 hmac_md6_64_256;363d5175df38bd9eaddd3f6ca18aa1c0c4aa22f0da245ac638d048398c26b8d3;json
497 500
498=head2 DATA PHASE 501=head2 DATA PHASE
499 502
500After this, packets get exchanged using the chosen framing protocol. It is 503After this, packets get exchanged using the chosen framing protocol. It is
501quite possible that both sides use a different framing protocol. 504quite possible that both sides use a different framing protocol.
502 505
506=head2 FULL EXAMPLE
507
508This is an actual protocol dump of an handshake, followed by a single data
509packet. The greater than/less than lines indicate the direction of the
510transfer only.
511
512 > aemp;0;nndKd+gn;10.0.0.1:4040;hmac_md6_64_256,cleartext;json,storable;provider=AE-0.0;peeraddr=127.0.0.1:1235
513 > 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 < dCEUcL/LJVSTJcx8byEsOzrwhzJYOq+L3YcopA5T6EAo
516 > hmac_md6_64_256;9513d4b258975accfcb2ab7532b83690e9c119a502c612203332a591c7237788;json
517 < hmac_md6_64_256;0298d6ba2240faabb2b2e881cf86b97d70a113ca74a87dc006f9f1e9d3010f90;json
518 > ["","wkp","pinger","10.0.0.1:4040#nndKd+gn.a","resolved"]
519
503=head1 SEE ALSO 520=head1 SEE ALSO
504 521
505L<AnyEvent>. 522L<AnyEvent>.
506 523
507=head1 AUTHOR 524=head1 AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines