} else if (serverOn && !status && [serverConnection isValid]) {
//Turn off
[service stop];
+ [service release];
[rootObject invalidate];
[serverConnection registerName:nil];
[serverConnection invalidate];
return valid;
}
+- (void)resetServerName
+{
+ if ([self isServerOn]) {
+ [service stop];
+ [service release];
+ service = [[NSNetService alloc] initWithDomain:@""
+ type:@"_mttp._tcp."
+ name:[[NSUserDefaults standardUserDefaults] stringForKey:@"sharedPlayerName"]
+ port:SERVER_PORT];
+ }
+}
+
- (BOOL)isServerOn
{
return serverOn;