Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : tcpClient quantity limits

www.cryer.info
Managed Newsgroup Archive

tcpClient quantity limits

Subject:tcpClient quantity limits
Posted by:"Larry" (lkill..@charter.net)
Date:Tue, 30 Jan 2007 10:14:40

Is there a limit to the number of tcpClient sockets that can reside on a
computer, practical or otherwise?

I am re-writing a program previously written in VB using an OCX socket
component.  It polls and reads from 30 product scales every ten seconds.  He
goes through a list of IP addresses, changing the IP and polling, changing
the IP and polling while listening on a telnet (character read  session.
They are fraught with problems and are loosing data and locking up
continously.

I recently developed two applications against the same hardware using Indy
components and thanks to Remy's knudges, they work like a charm.  But each
has two threaded instances of a TidTCPClient.

They listen on :
procedure TReadingIndexer1Thread.Execute;
begin
  while not Terminated do
  begin
    FConn.IOHandler.WaitFor(chr(2));
    FBuffer := FConn.IOHandler.ReadLn(chr(3));
    Synchronize(ProcessData);
  end;
end;
and catch the data seamlessly and process it.

I have minimal control over the devises serving me the data.  They are
scales that talk out RS-232 to a RS-232 to TCP/IP converter and are
transmitted to our porgram WiFi.  But they are TCP/IP packets.

Is 30 or more practical? How should I spawn off the threads?  Presently, I
have hard coded them at design time but think it necessary to do so at run
time since I cannot be assure when a new devise is added.

I look forward to any comments and suggestions.
Thanks,
Larry

Replies:

www.cryer.info
Managed Newsgroup Archive