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