4
** Copyright (c) 2001, 2002, 2003
6
** Author: Ludovic Marcotte <ludovic@Sophos.ca>
8
** This library is free software; you can redistribute it and/or
9
** modify it under the terms of the GNU Lesser General Public
10
** License as published by the Free Software Foundation; either
11
** version 2.1 of the License, or (at your option) any later version.
13
** This library is distributed in the hope that it will be useful,
14
** but WITHOUT ANY WARRANTY; without even the implied warranty of
15
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
** Lesser General Public License for more details.
18
** You should have received a copy of the GNU Lesser General Public
19
** License along with this library; if not, write to the Free Software
20
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
#ifndef _Pantomime_H_Connection
24
#define _Pantomime_H_Connection
26
#import <Foundation/NSData.h>
27
#import <Foundation/NSString.h>
33
- (id) initWithName: (NSString *) theName
36
- (id) initWithName: (NSString *) theName
38
connectionTimeout: (int) theConnectionTimeout
39
readTimeout: (int) theReadTimeout
40
writeTimeout: (int) theWriteTimeout;
44
// access / mutation methods
48
- (void) setName: (NSString *) theName;
51
- (void) setPort: (int) thePort;
53
- (int) connectionTimeout;
54
- (void) setConnectionTimeout: (int) theConnectionTimeout;
57
- (void) setReadTimeout: (int) theReadTimeout;
60
- (void) setWriteTimeout: (int) theWriteTimeout;
64
- (void) setStopTarget: (id) theTarget;
65
- (void) setStopSelector: (SEL) theSelector;
72
- (NSData *) readDataOfLength: (int) theLength;
73
- (NSData *) readDataToEndOfLine;
75
- (NSString *) readStringOfLength: (int) theLength;
76
- (NSString *) readStringToEndOfLine;
77
- (NSString *) readStringToEndOfLineSkippingCR: (BOOL) aBOOL;
79
- (BOOL) writeLine: (NSString *) theLine;
81
- (BOOL) writeData: (NSData *) theData;
82
- (BOOL) writeString: (NSString *) theString;
86
#endif // _Pantomime_H_Connection