From 14701a4fc7ee5dea92b4b01d4c1628a75eabdee5 Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Sun, 16 Feb 2003 11:04:38 +0000 Subject: [PATCH] Temporarily breaking the network sockets while I redo the whole thing --- ITInetServerSocket.m | 2 +- ITInetSocket.h | 23 +++++++++++++++++++++-- ITInetSocket.m | 5 ----- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ITInetServerSocket.m b/ITInetServerSocket.m index f7ff228..c37ec4f 100755 --- a/ITInetServerSocket.m +++ b/ITInetServerSocket.m @@ -233,7 +233,7 @@ static NSMutableSet *servsockets; else {perror("Too bad I haven't implemented error checking yet");} } else { - ITInetSocket *csocket = [[[ITInetSocket alloc] initWithFD:cfd delegate:self] autorelease]; + ITInetSocket *csocket = [[ITInetSocket alloc] initWithFD:cfd delegate:self]; [clients addObject:csocket]; [delegate newClientJoined:csocket]; } diff --git a/ITInetSocket.h b/ITInetSocket.h index 367c31e..94d102f 100755 --- a/ITInetSocket.h +++ b/ITInetSocket.h @@ -8,9 +8,28 @@ #import +@protocol ITInetSocketOwner +- (void)requestCompleted:(NSString*)data; +@end -@interface ITInetSocket : NSObject { +enum { + ITInetMaxConnections = 36; +}; +@interface ITInetSocket : NSObject { + int sockfd; + int port; + NSString *destAddr; } --(id)initWithFD:(int)fd delegate:(id)d; +// Init +-(id) initWithFD:(int)fd; +-(id) initWithFD:(int)fd delegate:(id)d; +-(id) initWithDelegate:(id)d; + ++(NSArray*) socketsForRendezvousScan; //need args + +// Mutators (some of these must be set before you can connect) +-(void) setPort:(int)port; +-(void) setPortViaServiceName:(NSString*)name; +-(void) setDest:(NSString*)dst; @end diff --git a/ITInetSocket.m b/ITInetSocket.m index bf47805..ad781b7 100755 --- a/ITInetSocket.m +++ b/ITInetSocket.m @@ -12,11 +12,6 @@ @implementation ITInetSocket -(id)initWithFD:(int)fd delegate:(id)d { - NSLog(@"Someone made a socket!"); return nil; } - --(void)disconnect -{ -} @end -- 2.20.1