[Botan-devel] Network I/O

Jack Lloyd lloyd at randombit.net
Thu May 31 12:46:11 EDT 2007


On Sun, May 27, 2007 at 08:17:54PM -0700, Barath Raghavan wrote:
> Hi Jack,
> 
> Thanks for the suggestion - I'll try it out tomorrow.  Does using a
> <msg length, msg> tuple per message seem like a reasonable approach to
> delimiting the messages?  (That is, sending the message length in
> network byte order followed by that many bytes of data.)

That's probably the most straightforward thing to try. A delimiter
marker (like the NULL in a C-style string) wouldn't work well since
you are sending arbitrary binary data. Or if you felt like overdoing
it you could encode everything into an ASN.1 structure and send
those (not worth it IMO).

-J



More information about the botan-devel mailing list