Bonjour server with multiple clients
Bonjour server with multiple clients
- Subject: Bonjour server with multiple clients
- From: Dave DeLong <email@hidden>
- Date: Fri, 09 Jan 2009 12:47:59 -0700
Hi everyone,
I'm writing a simple voting app, where one instance of the app creates
a poll and then publishes it over Bonjour. Other instances of the app
on the same local network then find the publish poll, get the list of
voting options, and then allow users at each computer to start
submitting votes. The votes are sent back over the Bonjour
connection, fed into a thread-safe queue, and the poll owner retrieves
them at his leisure.
I've gotten this setup to work with one client. I have one instance
of my app publishing an NSNetService, and another using an
NSNetServiceBrowser to find it and connect to it. They can then
successfully pass information back and forth (it was very exciting to
get this working!).
I've tried having multiple clients connect, but the server doesn't
ever receive any of their messages. So I guess my question is this:
Does my server need to publish a new NSNetService for each
connection? (ie, every time it accepts a connection, publish a new
version of the netservice for someone else to connect to) If not, how
should I be going about this?
Any pointers would be greatly appreciated. The sample code I've found
seems to all be a single server-client pair.
Thanks!
Dave DeLong
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden