-
-
Save hkalexling/1358f9bb2e0708b7bc1ba03daaeb97d0 to your computer and use it in GitHub Desktop.
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
static CFDataRef CFMessageHandler(CFMessagePortRef port, SInt32 messageID, CFDataRef data, void *info) { | |
if (data) { | |
const UInt8 *msg = CFDataGetBytePtr(data); | |
NSString *msgStr = [NSString stringWithCString:(char *)msg encoding:NSUTF8StringEncoding]; | |
NSLog(@"received message: %@", msgStr); | |
} | |
return CFDataCreate(NULL, 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment