-- (void)listenOnPort:(int)port remote:(BOOL)remote
-{
- if ( connection )
- {
- [self stopListener];
-
- waitingToListen = YES;
- connectionPort = port;
- connectionRemote = remote;
- }
- else
- {
- connection = [[CheatListener listenerWithDelegate:self port:port remote:remote] retain];
- connectionPort = port;
- connectionRemote = remote;
- }
-}
-
-- (void)stopListener
-{
- if ( connection )
- {
- close( sockfd );
- [connection release], connection = nil;
- }
-}
-
-
-- (void)broadcastWithName:(NSString *)name
-{
- if ( TCGlobalAllowRemote )
- {
- [self stopBroadcast];
-
- service = [[NSNetService alloc] initWithDomain:@"local." type:@"_cheat._tcp." name:name port:TCGlobalListenPort];
- [service setDelegate:self];
- [service publish];
- }
-}
-
-- (void)stopBroadcast
-{
- [service stop], service = nil;
-}
-
-
-- (IBAction)showAboutBoxWindow:(id)sender
-{
- if ( !aboutBoxController )
- {
- aboutBoxController = [[AboutBoxController alloc] init];
- }
-
- [aboutBoxController showWindow:self];
-}
-
-- (IBAction)showPreferenceWindow:(id)sender
-{
- if ( !preferenceController )
- {
- preferenceController = [[PreferenceController alloc] initWithDelegate:self];
- }
-
- [preferenceController showWindow:self];
-}
-
-- (IBAction)showNetTrafficWindow:(id)sender
-{
- if ( !netTrafficController )
- {
- netTrafficController = [[NetTrafficController alloc] initWithDelegate:self];
- }
-
- [netTrafficController showWindow:self];
-}
-
-
-- (IBAction)launchHelpFile:(id)sender
-{
- //[[NSWorkspace sharedWorkspace] openFile:[[NSBundle mainBundle] pathForResource:@"Read Me" ofType:@"html"] withApplication:@"Safari"];
- [[NSWorkspace sharedWorkspace] openURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Read Me" ofType:@"pdf"]]];
-}
-
-- (IBAction)launchWebsiteMenu:(id)sender
-{
- LaunchWebsite();
-}
-
-
-- (NSArray *)serverList
-{
- return serverList;
-}
-
-