Give me a B! Give me a U! Give me a G!
[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 - (oneway void)newClientJoined:(ITInetSocket*)client;
15 @end
16
17 @interface ITInetServerSocket : NSObject {
18     @private
19     int sockfd;
20     volatile int dieflag;
21     NSMutableSet *clients;
22     NSNetService *service;
23     id delegate;
24     short port;
25     NSString *rndType,*rndName;
26     NSTimer *timer;
27 }
28
29 - (id)init;
30 - (id)initWithDelegate:(id)d;
31
32 - (BOOL)start;
33 - (void)stop;
34
35 - (int)sockfd;
36 - (NSSet*)clients;
37 - (id)delegate;
38 - (short)port;
39
40 - (void)setServiceType:(NSString*)type useForPort:(BOOL)p;
41 - (void)setServiceName:(NSString*)name; // generally the computer's AppleTalk name
42 - (void)setPort:(short)p;
43 @end