Mark Slee | 77575e6 | 2007-09-24 19:24:53 +0000 | [diff] [blame] | 1 | #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 | |||||
17 | return [super initWithInputStream: input outputStream: output]; | ||||
18 | } | ||||
19 | |||||
20 | |||||
21 | @end | ||||
22 | |||||
23 | |||||
24 |