From: Alexander Strange Date: Sat, 15 Feb 2003 06:28:50 +0000 (+0000) Subject: Added an ITFoundationTester. Why doesn't it work inside PB? :\ X-Git-Tag: v0.1~53 X-Git-Url: http://git.ithinksw.org/ITFoundation.git/commitdiff_plain/d7b4e9008bca3278755f8b96c0ea9d5e3c94c39d Added an ITFoundationTester. Why doesn't it work inside PB? :\ --- diff --git a/ITFoundation.h b/ITFoundation.h index f4575de..ee1aa52 100755 --- a/ITFoundation.h +++ b/ITFoundation.h @@ -16,4 +16,6 @@ #import #import -#import \ No newline at end of file +#import +#import +#import \ No newline at end of file diff --git a/ITInetServerSocket.h b/ITInetServerSocket.h index ef2d5e1..dd5eba6 100755 --- a/ITInetServerSocket.h +++ b/ITInetServerSocket.h @@ -27,10 +27,14 @@ - (id)init; - (id)initWithDelegate:(id)d; +- (BOOL)start; +- (void)stop; + - (int)sockfd; - (NSSet*)clients; - (id)delegate; - (short)port; + - (void)setServiceType:(NSString*)type useForPort:(BOOL)p; - (void)setServiceName:(NSString*)name; // generally the computer's AppleTalk name - (void)setPort:(short)p; diff --git a/ITInetServerSocket.m b/ITInetServerSocket.m index f4b9720..8f75326 100755 --- a/ITInetServerSocket.m +++ b/ITInetServerSocket.m @@ -78,7 +78,7 @@ static NSTimer *timer; [rndType release]; } -- (BOOL)registerSocket +- (BOOL)start { if (!rndName || !rndType || !port) return NO; [ITInetServerSocket registerSocket:self]; diff --git a/ShowcaseController.h b/ShowcaseController.h new file mode 100755 index 0000000..2e18b74 --- /dev/null +++ b/ShowcaseController.h @@ -0,0 +1,16 @@ +// +// ShowcaseController.h +// ITFoundation +// +// Created by Alexander Strange on Fri Feb 14 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import +#import + +@interface ShowcaseController : NSObject { + +} + +@end diff --git a/ShowcaseController.m b/ShowcaseController.m new file mode 100755 index 0000000..2efe0a4 --- /dev/null +++ b/ShowcaseController.m @@ -0,0 +1,27 @@ +// +// ShowcaseController.m +// ITFoundation +// +// Created by Alexander Strange on Fri Feb 14 2003. +// Copyright (c) 2003 __MyCompanyName__. All rights reserved. +// + +#import "ShowcaseController.h" + + +@implementation ShowcaseController +- (void)applicationDidFinishLaunching:(NSNotification *)note +{ + + ITInetServerSocket *sock = [[ITInetServerSocket alloc] initWithDelegate:self]; + NSLog(@"rawr?"); + [sock setPort:4776]; + [sock setServiceName:@"Test Rendezvous Service"]; + [sock setServiceType:@"ittest" useForPort:NO]; + [sock start]; +} + +- (void)newClientJoined:(ITInetSocket*)client +{ +} +@end diff --git a/Showcase_main.m b/Showcase_main.m new file mode 100755 index 0000000..f633532 --- /dev/null +++ b/Showcase_main.m @@ -0,0 +1,15 @@ +/* + * Showcase_main.m + * ITFoundation + * + * Created by Alexander Strange on Fri Feb 14 2003. + * Copyright (c) 2003 __MyCompanyName__. All rights reserved. + * + */ + +#import + +int main(int argc, const char *argv[]) +{ + return NSApplicationMain(argc,argv); +} \ No newline at end of file