Re: Suggestions for custom application-layer protocol?
From: David Schwartz (davids_at_webmaster.com)
Date: 05/25/05
- Next message: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Previous message: ask: "about kernel_thread"
- Maybe in reply to: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Reply: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 May 2005 13:07:30 -0700
"Mark" <mark_2811nospam@excite.com> wrote in message
news:0N4le.10977$on1.1525@clgrps13...
> Thanks for all the excellent suggestions so far. I'll read through the
> RFCs
> for various Internet application protocols. I've also found some good
> information in Eric S. Raymond's online book "Art of Unix Programming".
> It
> would be nice to be able to use a simple standard protocol of some kind.
> It
> seems strange to have to come up with ways of formatting text fields,
> delimiting messages etc since I'm sure this has been done already many
> times
> before.
You can take a page from the URL encoding scheme and use a list of
<param_name>=<value> pairs delimited by & signs. Encode all less than signs,
greater than signs, & signs, = signs, percent signs, whitespace, control
characters, and non-ascii characters as '%xy' where x and y are the first
and second hexadecimal digit of the ASCII value.
So a query might be:
query=get¶meter=uptime<newline>
And a reply might be:
query=get¶meter=uptime&value=1%20hour,%205%20minutes<newline>
Specify that each end ignore any parameters they don't understand
(rather than considering it an error), and your protocol is extensible.
DS
- Next message: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Previous message: ask: "about kernel_thread"
- Maybe in reply to: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Reply: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|