Re: Suggestions for custom application-layer protocol?
From: Grant Edwards (grante_at_visi.com)
Date: 05/27/05
- Next message: madhav_a_kelkar_at_hotmail.com: "Re: How to check if the other application exists using UDP sockets"
- Previous message: Roger Leigh: "Re: Record locking and mounted file systems"
- Maybe in reply to: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: James Antill: "Re: Suggestions for custom application-layer protocol?"
- Reply: James Antill: "Re: Suggestions for custom application-layer protocol?"
- Reply: Glyn Davies: "Re: Suggestions for custom application-layer protocol?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 May 2005 00:04:16 -0000
On 2005-05-26, Mark <mark_2811nospam@excite.com> wrote:
> I expect I will end up with a text-based protocol, with a header
> that indicates the number of bytes in the payload.
If you're using a text-based protocol, you don't nead a header
with a payload count to tell you where the message ends. Use
an end-of-message character or string. The cr/lf pair is used
as the end-of-message delimiter by a lot of text-based
runs-on-top of TCP protocols. That approach works wonderfully
with line-oriented high-level text-handling libraries and
utilties -- you can do all sorts of useful stuff using nothing
but a few utilities like netcat, expect, and so on.
I've also seen protocols that use STX/ETX to frame messages,
and that works nicely as well, but isn't as compatible with
pre-existing utilities.
> The payloads will be composed of field=value pairs.
That Sounds like a good plan.
> Thanks guys I really appreciate it, this discussion has helped
> me out a great deal!
--
Grant Edwards grante Yow! Hey, LOOK!! A pair of
at SIZE 9 CAPRI PANTS!! They
visi.com probably belong to SAMMY
DAVIS, JR.!!
- Next message: madhav_a_kelkar_at_hotmail.com: "Re: How to check if the other application exists using UDP sockets"
- Previous message: Roger Leigh: "Re: Record locking and mounted file systems"
- Maybe in reply to: Walter Roberson: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: James Antill: "Re: Suggestions for custom application-layer protocol?"
- Reply: James Antill: "Re: Suggestions for custom application-layer protocol?"
- Reply: Glyn Davies: "Re: Suggestions for custom application-layer protocol?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|