2 // ShowcaseController.m
5 // Created by Alexander Strange on Fri Feb 14 2003.
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
9 #import "ShowcaseController.h"
10 #import "ITInetSocket.h"
14 @implementation ShowcaseController
17 sock = [[ITInetSocket alloc] initWithDelegate:self];
19 [sock connectToHost:@"irc.freenode.net" onPort:6667];
22 - (void) finishedConnecting:(ITInetSocket *)sender {
26 - (void) errorOccured:(ITInetSocketError)err during:(ITInetSocketState)state onSocket:(in ITInetSocket*)sender {NSLog(@"wtf");[sender retryConnection];}
27 - (void) dataReceived:(ITInetSocket *)sender
31 - (void) newDataAdded:(ITByteStream*)sender {
32 static int firstTime = YES;
33 NSString *ircini = @"USER m0nk3ys . . :Not Telling\r\nNICK ITFTest\r\n", *irc2 = @"JOIN #iThink\r\nPRIVMSG #iThink :w00t\r\nQUIT :!\r\n";
34 NSLog(@"Writing something");
35 NSData *d = [NSData dataWithBytes:[firstTime?ircini:irc2 cString] length:[firstTime?ircini:irc2 length]];
36 [sock->writePipe writeData:d];
37 NSLog(@"Reading something");