On 30 January 2010 13:36, Roberto Mannai <roberm...@gmail.com> wrote:
> 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

Yes, I suppose so :)

> (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":

Ah, you're thinking of "nice" protocols :)  Although I believe telnet
has some non-text parts to it too.

I was thinking more along the lines of DNS or DICOM etc., but I
suppose the fact that it's binary does not really matter.  It's still
just messages being passed back and forth and each one needs to be
parsed and dealt with and possibly responded to.

> - 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).

Yes, thanks.

> 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.

I suppose I should have asked a proper question :) but I didn't have a
specific question really.

What prompted my question was the following:

I have come across references to a "declarative implementation of the
DICOM-3 network protocol" written in Common Lisp and I was wondering
what that means, exactly, and how one would go about doing something
for an arbitrary network protocol.

-- 
Michael Wood <esiot...@gmail.com>

-- 
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

Reply via email to