Bonjour updateServices problem
Hi,
I just was trying out a bonjour related app where two or more devices kind of communicate with each other. So far the communication works fine but it seems like there is a problem -maybe bug- in the bonjour service inside Titanium Mobile SDK.
When I do an update of the services with updateServices I get duplicate entries of the same device and therefor missing other devices in the list. If I immediately fire an update on the first device it sometimes works.
Steps to reproduce:
I start the app on device A, updateServices results in one entry (device A).
I start the app on device B, updateServices results in two entries (both device A, missing device B entry. If I fire a stop and re-search it sometimes works and both devices appear).
Like this device B can communicate with device A, but device A not with device B.
These steps can be reproduced for further devices where only the always-last added device finds all others.
Probably I am doing something wrong but I used the KitchenSink Example of the bonjour module which can be found at http://github.com/appcelerator/KitchenSink/blob/master/1.3.x/KitchenSink/Resources/examples/bonjour.js
I use the device id as main bonjour name identifier for each device.
Any help is greatly appreciated. Thanks in advance.
Ben