Board index » delphi » Considerations when designing a TCP/IP protocol

Considerations when designing a TCP/IP protocol

I need to design a simple protocol to exchange some information between the
server and workstation using the tcp/ip protocol as the base. What
considerations should I have when designing it ?
 

Re:Considerations when designing a TCP/IP protocol


Quote
"Kirsten" <kirs...@no-spam.com> wrote in message

news:91t0h4$k3t4@bornews.inprise.com...

Quote
> I need to design a simple protocol to exchange some information between
the
> server and workstation using the tcp/ip protocol as the base. What
> considerations should I have when designing it ?

Well, a good place to start might be to look at how the common protocols
have been designed. E.g. search for POP3 over at http://www.rfc-editor.org
and you'll notice that:
 - all commands are issued as text. Advantage: Easy to test using plain ol'
telnet, meaning you can actually test a server implementation without
writing one line of client code. Downside: more parsing work for your
command interpreter
 - all text commands have a fixed length (4 characters max in both SMTP and
POP3) making parsing slightly easier
 - when transferring large blocks of data, either indicate max number of
bytes (look at Indy's WriteStream implementation which'll write the stream
size ahead of the stream unless ordered not to do so) or end the
transmission with a terminating sequence (single dot alone on a line in the
case of POP3 / SMTP).
 - try to avoid small (and numerous) data packets if possible

--
Rune

Re:Considerations when designing a TCP/IP protocol


rmob...@arxi.no (Rune Moberg) wrote in <91t6b6$5...@bornews.inprise.com>:

Quote
>"Kirsten" <kirs...@no-spam.com> wrote in message
>news:91t0h4$k3t4@bornews.inprise.com...
>> I need to design a simple protocol to exchange some information between
>the
>> server and workstation using the tcp/ip protocol as the base. What
>> considerations should I have when designing it ?

Might also look at the Intro To Indy article, it covers some of this.

--
Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
      "Programming is an art form that fights back"
Forget the Y2K problem, Lets fix the W2K problem.
http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Other Threads