diff -r 000000000000 -r 2bd9d60a2c46 TCP/TCPEndpoint.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TCP/TCPEndpoint.h Sun May 25 10:28:26 2008 -0700 @@ -0,0 +1,42 @@ +// +// TCPEndpoint.h +// MYNetwork +// +// Created by Jens Alfke on 5/14/08. +// Copyright 2008 Jens Alfke. All rights reserved. +// + +#import +#import + + +// SSL properties: +#define kTCPPropertySSLCertificates ((NSString*)kCFStreamSSLCertificates) +#define kTCPPropertySSLAllowsAnyRoot ((NSString*)kCFStreamSSLAllowsAnyRoot) +extern NSString* const kTCPPropertySSLClientSideAuthentication; // value is SSLAuthenticate enum + + +/** Abstract base class of TCPConnection and TCPListener. + Mostly just manages the SSL properties. */ +@interface TCPEndpoint : NSObject +{ + NSMutableDictionary *_sslProperties; + id _delegate; +} + +/** The desired security level. Use the security level constants from NSStream.h, + such as NSStreamSocketSecurityLevelNegotiatedSSL. */ +@property (copy) NSString *securityLevel; + +/** Detailed SSL settings. This is the same as CFStream's kCFStreamPropertySSLSettings + property. */ +@property (copy) NSMutableDictionary *SSLProperties; + +/** Shortcut to set a single SSL property. */ +- (void) setSSLProperty: (id)value + forKey: (NSString*)key; + +//protected: +- (void) tellDelegate: (SEL)selector withObject: (id)param; + +@end