TCP/TCPEndpoint.h
author Jens Alfke <jens@mooseyard.com>
Fri May 23 17:37:36 2008 -0700 (2008-05-23)
changeset 0 9d67172bb323
child 8 6f539dd9921c
permissions -rw-r--r--
First checkin after breaking out of Cloudy
     1 //
     2 //  TCPEndpoint.h
     3 //  MYNetwork
     4 //
     5 //  Created by Jens Alfke on 5/14/08.
     6 //  Copyright 2008 Jens Alfke. All rights reserved.
     7 //
     8 
     9 #import <Foundation/Foundation.h>
    10 #import <CoreServices/CoreServices.h>
    11 
    12 
    13 // SSL properties:
    14 #define kTCPPropertySSLCertificates  ((NSString*)kCFStreamSSLCertificates)
    15 #define kTCPPropertySSLAllowsAnyRoot ((NSString*)kCFStreamSSLAllowsAnyRoot)
    16 extern NSString* const kTCPPropertySSLClientSideAuthentication;    // value is SSLAuthenticate enum
    17 
    18 
    19 /** Abstract base class of TCPConnection and TCPListener.
    20     Mostly just manages the SSL properties. */
    21 @interface TCPEndpoint : NSObject
    22 {
    23     NSMutableDictionary *_sslProperties;
    24     id _delegate;
    25 }
    26 
    27 /** The desired security level. Use the security level constants from NSStream.h,
    28     such as NSStreamSocketSecurityLevelNegotiatedSSL. */
    29 @property (copy) NSString *securityLevel;
    30 
    31 /** Detailed SSL settings. This is the same as CFStream's kCFStreamPropertySSLSettings
    32     property. */
    33 @property (copy) NSMutableDictionary *SSLProperties;
    34 
    35 /** Shortcut to set a single SSL property. */
    36 - (void) setSSLProperty: (id)value 
    37                  forKey: (NSString*)key;
    38 
    39 //protected:
    40 - (void) tellDelegate: (SEL)selector withObject: (id)param;
    41 
    42 @end