Sockets Question

Andrew Henshaw henshaw at me.com
Wed Aug 24 12:01:13 EDT 2011


I hope someone might have an answer as im just back from vacation and starting to pull my hair out already :)

I have an app that I would like to implement a sync feature in.  The first step to this would appear to be able to exchange data between the devices using the local network.  I have sockets up and running,  can exchange data etc between devices,  all great so far.  

The problem is at the moment I need to enter the IP address of the 'server' in the setup into the clients for them to be able to connect,  but I would like the clients to be able to discover the sever automatically as would happen in most apps.

Ive read all sorts of posts from simply scanning the ports,  through to using 'datagrams' or broadcast messages,  but nothing seems to work.  Scanning the ports seems very slow and unreliable,  while datagrams just dont seem to do anything at all.

Is there anything anyone can suggest,  it really doesnt matter how its done as long as it works and is reliable.  

Thanks

Andy








More information about the use-livecode mailing list