Now all ITInetServerSockets share one runloop timer. Had to rewrite the entire API...
[ITFoundation.git] / ITInetServerSocket.h
1 //
2 //  ITInetServerSocket.h
3 //  ITFoundation
4 //
5 //  Created by Alexander Strange on Thu Feb 13 2003.
6 //  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10
11 @class ITInetSocket;
12
13 @protocol ITInetServerSocketOwner
14 - (void)newClientJoined:(ITInetSocket*)client;
15 @end
16
17 @interface ITInetServerSocket : NSObject {
18     @private
19     int sockfd;
20     NSMutableSet *clients;
21     NSNetService *service;
22     id delegate;
23     short port;
24     NSString *rndType,*rndName;
25 }
26
27 - (id)init;
28 - (id)initWithDelegate:(id)d;
29
30 - (int)sockfd;
31 - (NSSet*)clients;
32 - (id)delegate;
33 - (short)port;
34 - (void)setServiceType:(NSString*)type useForPort:(BOOL)p;
35 - (void)setServiceName:(NSString*)name; // generally the computer's AppleTalk name
36 - (void)setPort:(short)p;
37 @end