ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Re: [ECS] Socket Connection
Ingo Pakleppa
Sun, 07 Jan 2001 11:37:15 -0800

If you are talking about binary data, it would be nice or even necessary to 
have support for the most common binary-to-ascii conversions and mime types 
(since many protocols, such as HTTP, only allow ASCII characters). BASE64 
is probably the most common (and very easy to implement), UUENCODE is also 
sometimes used, and binhex is an also-ran in that arena.

I think it might be a good idea to implement at least the basics of 
protocols, since almost all TCP/IP protocols use the same structure: a 
one-line command, followed by a couple headers (which are attribute-value 
pairs separated by colons), exactly one blank line, and then content of a 
given length, which can be encoded or plain-text depending on the mime-type 
used.

One exception is FTP; since that works with inbound as well as outbound 
connections, it is actually quite tricky to implement if you are interested 
in it.

Maybe before getting started on such a project, it would be a good idea to 
figure out how the socket connections would be used.

Ingo

At 11:39 AM 1/7/2001 +0100, Dario Greggio wrote:
>Ingo Pakleppa wrote:
> >
> > Handing
> > over one byte or one character at a time is WAAAAYYYYY too slow for TCP/IP;
> >
> > [...] (typically, CR/LF has special meanings and the number of them 
> must be [...]
>
>Completely agreed!
>I'd suggest creating a text item a char at a time, and then sending it
>all. Receiving a line of text would be the done the same way, then you
>can parse it. Actually, you could also receive a bunch of data (such as
>a GIF image)...
>
>--
>Ciao,
>Dario
>--
>ADPM Synthesis sas - Torino
>--
>http://www.geocities.com/adpm99


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.