Sockets don't quite work, but they will almost work.
[ITFoundation.git] / ShowcaseController.m
1 //
2 //  ShowcaseController.m
3 //  ITFoundation
4 //
5 //  Created by Alexander Strange on Fri Feb 14 2003.
6 //  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
7 //
8
9 #import "ShowcaseController.h"
10 #import "ITInetSocket.h"
11 #import <Foundation/NSString.h>
12 #import <SystemConfiguration/SystemConfiguration.h>
13
14
15 @implementation ShowcaseController
16 - (void)awakeFromNib
17 {
18     server = [[ITInetServerSocket alloc] initWithDelegate:self];
19     [server setPort:1338];
20     [server setServiceType:@"ittest" useForPort:NO];
21     [server setServiceName:[(NSString*)SCDynamicStoreCopyComputerName(NULL,NULL) autorelease]];
22     [server start];
23     [ITInetSocket startAutoconnectingToService:@"ittest" delegate:self];
24 }
25
26 - (void) finishedConnecting:(ITInetSocket *)sender {
27     [sender disconnect];
28 }
29
30 - (void) errorOccured:(ITInetSocketError)err during:(ITInetSocketState)state onSocket:(in ITInetSocket*)sender
31 {
32 }
33
34 - (void) dataReceived:(ITInetSocket *)sender
35 {
36 }
37
38 - (void) newDataAdded:(ITByteStream*)sender
39 {
40
41 }
42
43 - (void)newClientJoined:(ITInetSocket*)client
44 {
45     
46 }
47 @end