Some mre debugging stuff, should be removed before rele
[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     NSTimer *timer;
26 }
27
28 - (id)init;
29 - (id)initWithDelegate:(id)d;
30
31 - (BOOL)start;
32 - (void)stop;
33
34 - (int)sockfd;
35 - (NSSet*)clients;
36 - (id)delegate;
37 - (short)port;
38
39 - (void)setServiceType:(NSString*)type useForPort:(BOOL)p;
40 - (void)setServiceName:(NSString*)name; // generally the computer's AppleTalk name
41 - (void)setPort:(short)p;
42 @end