Created
October 3, 2012 06:02
-
-
Save trentbrooks/3825313 to your computer and use it in GitHub Desktop.
Basic native bonjour server service to make a device discoverable in openframeworks ios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "testApp.h" | |
NSNetService *netService; | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
// initialise bonjour server: broadcasts the type + name so you can see devices ip + port | |
// note: this is a basic example, and does not implement any of the Net Service Delegate Methods to see if the service was published successfully or not | |
netService = [[NSNetService alloc] | |
initWithDomain:@"" | |
type:@"_MyService._tcp." | |
name:@"" | |
port:9876]; | |
[netService publish]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment