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
Sat, 06 Jan 2001 10:53:08 -0800

That may offer more flexibility, but it will probably disappoint... Handing 
over one byte or one character at a time is WAAAAYYYYY too slow for TCP/IP; 
most likely, whatever server you connect to will time out well before you 
sent the response. It only works for serial communication because there, 
the modem is slow, too. Most applications that use TCP/IP use buffers of at 
least 1k that get passed to or from the operating system to achieve 
reasonable performance. Even in C++ (Windows NT), I found that reading 
bytes one at a time from the operating system usually failed pretty quickly 
because of the overhead of OS function calls involved.

Incidentally, most TCP/IP protocols (FTP, HTTP, ...) indeed use text for 
80% of their own purposes, but they all require some non-textual characters 
(typically, CR/LF has special meanings and the number of them must be 
exactly right - one CR/LF too many, or a missing or extra CR before an LF, 
will screw up your protocol big time). Most protocols also require you to 
specify the number of payload bytes in advance, so there, too, you need 
control over exactly what gets sent with a line of text.

Ingo

At 03:14 PM 1/5/2001 -0500, Mark Gilmore wrote:
>Handling it one byte at a time would offer greater
>flexibility and avoid the need for a hard-coded "protocol"
>(which would best be handled by Events).
>--
>Mark Gilmore
>Omnipotence (ECS home automation software)
>http://omnipotencesoftware.com
>423-745-0026
>Hours: Mon-Sat, 9AM-8PM/EST
>
>
>David Kindred wrote:
> >
> > I think if I were to use it, I'd want to be able to load a whole text line
> > with data in one pass. Nathan, what do you think? And, Nathan, were you
> > thinking about just sending data TO ECS, or did you want ECS to be able to
> > hold a 2-way conversation?
> >
> > I'm in for $50. Any others interested?
> >
> > --David
> >
> > -----Original Message-----
> > From: Mark Gilmore [mailto:omnip@usit.net]
> > Sent: Friday, January 05, 2001 1:02 PM
> > To: ecs-list@netbloc.com
> > Subject: Re: [ECS] Socket Connection
> >
> > I could probably tackle it for $200-$400,
> > depending on the complexity.
> > Do we just want to load a Text-Line with data
> > received from an IP address ?
> > Or do we want to load byte values one at a time
> > (sim to the SERIAL-BYTE Item) ?
> > --
> > Mark Gilmore
> > Omnipotence (ECS home automation software)
> > http://omnipotencesoftware.com
> > 423-745-0026
> > Hours: Mon-Sat, 9AM-8PM/EST
> >
> > David Kindred wrote:
> > >
> > > Hmmmmm, that's an intriguing idea, Nathan. Mark, how big ($) a 
> programming
> > > effort would that be? I might chip in a few buckers. Anyone else think it
> > > would be worth it?
> > >
> > > --David
> > >
> > > -----Original Message-----
> > > From: Nathan Brown [mailto:nbrown@thystonius.com]
> > > Sent: Friday, January 05, 2001 12:51 AM
> > > To: ECS UserList (E-mail)
> > > Subject: [ECS] Socket Connection
> > >
> > > Mark / All,
> > >         I have found a couple programs that I would like to integrate
> > > with ECS, but they are use a socket connection.  What do you think about
> > > adding a Socket Byte item that would act just like the serial byte, but
> > > would be for a tcpip socket?
> > >
> > > Nathan


  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
.