1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/TCP/TCPEndpoint.h Sat May 24 13:26:02 2008 -0700
1.3 @@ -0,0 +1,42 @@
1.4 +//
1.5 +// TCPEndpoint.h
1.6 +// MYNetwork
1.7 +//
1.8 +// Created by Jens Alfke on 5/14/08.
1.9 +// Copyright 2008 Jens Alfke. All rights reserved.
1.10 +//
1.11 +
1.12 +#import <Foundation/Foundation.h>
1.13 +#import <CoreServices/CoreServices.h>
1.14 +
1.15 +
1.16 +// SSL properties:
1.17 +#define kTCPPropertySSLCertificates ((NSString*)kCFStreamSSLCertificates)
1.18 +#define kTCPPropertySSLAllowsAnyRoot ((NSString*)kCFStreamSSLAllowsAnyRoot)
1.19 +extern NSString* const kTCPPropertySSLClientSideAuthentication; // value is SSLAuthenticate enum
1.20 +
1.21 +
1.22 +/** Abstract base class of TCPConnection and TCPListener.
1.23 + Mostly just manages the SSL properties. */
1.24 +@interface TCPEndpoint : NSObject
1.25 +{
1.26 + NSMutableDictionary *_sslProperties;
1.27 + id _delegate;
1.28 +}
1.29 +
1.30 +/** The desired security level. Use the security level constants from NSStream.h,
1.31 + such as NSStreamSocketSecurityLevelNegotiatedSSL. */
1.32 +@property (copy) NSString *securityLevel;
1.33 +
1.34 +/** Detailed SSL settings. This is the same as CFStream's kCFStreamPropertySSLSettings
1.35 + property. */
1.36 +@property (copy) NSMutableDictionary *SSLProperties;
1.37 +
1.38 +/** Shortcut to set a single SSL property. */
1.39 +- (void) setSSLProperty: (id)value
1.40 + forKey: (NSString*)key;
1.41 +
1.42 +//protected:
1.43 +- (void) tellDelegate: (SEL)selector withObject: (id)param;
1.44 +
1.45 +@end