Skip to content
Browse files

Make the iOS demo app continuously receive packets.

  • Loading branch information...
1 parent 0df5117 commit 318b8770369b5bdab184c50f3a47a0c19458065b @danieldickison committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 Demo-ios/AppDelegate.m
View
3 Demo-ios/AppDelegate.m
@@ -32,11 +32,13 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application
{
connection = [[OSCConnection alloc] init];
connection.delegate = self;
+ connection.continuouslyReceivePackets = YES;
NSError *error;
if (![connection bindToAddress:nil port:0 error:&error])
{
NSLog(@"Could not bind UDP connection: %@", error);
}
+ [connection receivePacket];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
((UITextField *)[window viewWithTag:kTagRemoteHost]).text = [defaults stringForKey:@"remoteHost"];
@@ -99,7 +101,6 @@ - (IBAction)sendPacket
case 8: [message addNull]; break;
}
[connection sendPacket:message toHost:remoteHost port:[remotePort intValue]];
- [connection receivePacket];
[message release];
}

0 comments on commit 318b877

Please sign in to comment.
Something went wrong with that request. Please try again.