rsms / peertalk

iOS and Mac Cocoa library for communicating over USB
https://rsms.me/peertalk/
MIT License
3.43k stars 502 forks source link

Connecting with more than one device #7

Closed Mehul18292 closed 10 years ago

Mehul18292 commented 10 years ago

I want to send some msgs on all connected usb devices. Here this code works for only single connected device. is there any way to connect to more than one device at a time. Thanks for the help in advance.

rsms commented 10 years ago

Simply maintain connections to all connected devices. Here's an example I just wrote (don't have Xcode at the moment of writing this, so this is truly untested code, but I think you'll get the idea): https://gist.github.com/rsms/0f853a0c8c7753639498

Mehul18292 commented 10 years ago

Thanks a lot. After making some minor changes, your code worked really well