blob: e8ae6e9ec6f411abfb3de1f40da3e21bb5bacd86 [file] [log] [blame]
Mark Slee77575e62007-09-24 19:24:53 +00001#import <Cocoa/Cocoa.h>
2#import "TSocketClient.h"
3
4@implementation TSocketClient
5
6- (id) initWithHostname: (NSString *) hostname
7 port: (int) port
8{
9 NSInputStream * input = nil;
10 NSOutputStream * output = nil;
11
12 [NSStream getStreamsToHost: [NSHost hostWithName: hostname]
13 port: port
14 inputStream: &input
15 outputStream: &output];
16
Mark Slee84406052007-11-20 01:39:25 +000017 self = [super initWithInputStream: input outputStream: output];
18 [input open];
19 [output open];
20
21 return self;
Mark Slee77575e62007-09-24 19:24:53 +000022}
23
24
25@end
26
27
28