DNS-SD with mergeBonjour and rresocket?

Monte Goulding monte at sweattechnologies.com
Fri Dec 21 16:22:04 EST 2012


Forgot to answer this bit:
On 22/12/2012, at 8:05 AM, JOHN PATTEN <johnpatten at me.com> wrote:

> I also have mergeBonjour working to discover the new registered service in the iOS simulator, so far so good.
> 
> My next step is to open a socket on the desktop app with the correct port, just like normal: 
> 
>  open socket to "localhost:5600"
>  if the Result <> "" then
>  put "result:" && the result
>              end if

nope... look at the accept connections command. And you want to accept connections on the port you advertise the service on.
> 
> Then to use the rresocket external to open a connection on the iOS device, and write the data/text out to the open port on the desktop app.  Not sure what to make about the read me in the rresocket folder? Not sure what "Tail commands" are and the demo that is included appears to be broken.
> 
> What would the rrsecocket commands look like on my iOS app to open a connection to my desktop app and then write out some data to that desktop app?

You don't need to worry about if the command is tail or not. That's just for the external. Basically, get the ip and port from mergBonjour then open a socket and write to it when you get the callback after opening then close or read from it when you get the callback after the write. On the desktop you accept connections with message and when the message is triggered you read from the socket then close or send a response etc.

Cheers

--
Monte Goulding

M E R Goulding - software development services
mergExt - There's an external for that!








More information about the use-livecode mailing list