I should not go with an automatic parser. Binary network protocols can mean a broad range of things :). If there is just a passive consumer (like a textual HTTP browser), you could "consume" all the binary data and then parse it, though I don't know if do exist a grammar for binary symbols (just found this: http://www.iwriteiam.nl/Ha_BFF.html). You likely are consuming a real time stream, so the binary data is the actual content, not a structured message.
In general, high level network protocols are text-based: HTTP, telnet, POP, SMTP. There is some "trick": - you can send binary attachments with SMTP or consume them via HTTP because they are encoded in a textual description (BASE64); - the FTP protocol is two-faced: the interactive command controls are sent via a textual protocol, whereas the binary data is sent in a binary stream (in a new TCP port). Low level protocols (TCP or IP) are binary protocols. The packets have a format (http://www.faqs.org/rfcs/rfc793.html) which can be quickly checked in a numeric way, not in a symbolic way. The check is not just on the "format", but also on the content, via checksum redundancy bits. Just a parsing is not enough. On Sat, Jan 30, 2010 at 7:49 AM, Michael Wood <esiot...@gmail.com> wrote: > How about for things like binary network protocols? Would you treat > them the same way as e.g. source code for a language? Obviously > there's no "code generation", but you still need to parse it. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en