Finished the server sockets, almost. Not touched clients yet. Cleanups for other...
[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     int sockfd;
19     NSMutableSet *clients;
20     NSNetService *service;
21     id delegate;
22 }
23
24 - (id)init;
25 - (id)initWithServiceName:(NSString*)name delegate:(id)d;
26 - (id)initWithPort:(NSNumber*)port rendezvousName:(NSString*)name delegate:(id)d;
27
28 - (int)sockfd;
29 - (NSSet*)clients;
30 - (id)delegate;
31 @end