Open Socket Question

Dave dave at looktowindward.com
Thu Feb 21 14:14:14 EST 2008


Hi All,

I have a number of applications that communicate with each other  
using TCP/IP Sockets. For a given application, I want to be able to  
connect it to a number of "server" applications, however the "server"  
apps make or may not be running, so what I want to be able to do is  
to issue an open socket to a "server" application and if the  
connection is made add it to a "connected" table and if not, carry on  
the to next server, but try to open the socket again at a later time.

I can't seem to be able to get my head around the code needed to do  
this!

Basically I have a Function that gets called with a list of the IP  
Addresses in the for - aa.bb.cc.dd:port and a ConnectionID, I want to  
be able to open a socket to each IP/Port with the specified  
ConnectionID . The function definition for this is as follows:

function StartClient theConnectToServerList,theConnectionID

theConnectToServerList is a list of the following

192.168.1.100:6000
192.168.1.100:6002
192.168.1.100:6004

etc.

Any ideas on how achieve this gracefully would be greatly appreciated!

All the Best
Dave






More information about the use-livecode mailing list