Question

I need to connect around 25 client devices to one server device (will all be iOS, though Android would be nice). I know there are several solutions to this problem, and I'd lean towards MultipeerConnectivity myself, but there is a limit of 8 simultaneous users. As dicussed elsewhere, there are workarounds, and I am not opposed to opening multiple sessions, but it it seems rather roundabout. I thought about using CocoaHTTPServer to make an API and advertise over Bonjour, but I would like it to work with a restrictive network, and preferably bypassing a public network all together. GameKit seems out for me because I don't want it to be open to the public (not a game, and specific to a confined area).

An HTTP server on some obscure (random) port seems like a good option, being cross-platform and easily testable with multiple devices, but school networks can be very restrictive. Multipeer gives the limitations of device numbers and other difficult-to-test variables, and GameKit is too public. Is there another route here, or should I narrow it down to CocoaHTTPServer, MultipeerConnectivity, or a combination of the two?

Was it helpful?

Solution

I decided to go with MultipeerConnectivity and using only one session, and letting some client devices wait for an opening in the server. I didn't really need every device to be connected simultaneously, and figured that the odds of Bluetooth being reliable with that many devices is unlikely anyways.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top