TCP/TCP_Internal.h
author Jens Alfke <jens@mooseyard.com>
Fri Jul 24 14:06:28 2009 -0700 (2009-07-24)
changeset 63 5e4855a592ee
parent 19 16454d63d4c2
permissions -rw-r--r--
* The BLIPConnection receivedRequest: delegate method now returns BOOL. If the method returns NO (or if the method isn't implemented in the delegate), that means it didn't handle the message at all; an error will be returned to the sender.
* If the connection closes unexpectedly due to an error, then the auto-generated responses to pending requests will contain that error. This makes it easier to display a meaningful error message in the handler for the request.
jens@0
     1
//
jens@0
     2
//  TCP_Internal.h
jens@0
     3
//  MYNetwork
jens@0
     4
//
jens@0
     5
//  Created by Jens Alfke on 5/18/08.
jens@0
     6
//  Copyright 2008 Jens Alfke. All rights reserved.
jens@0
     7
//
jens@0
     8
jens@0
     9
jens@0
    10
#import "TCPWriter.h"
jens@0
    11
#import "TCPConnection.h"
jens@0
    12
#import "TCPListener.h"
jens@0
    13
jens@0
    14
/* Private declarations and APIs for TCP client/server implementation. */
jens@0
    15
jens@0
    16
jens@0
    17
jens@0
    18
@interface TCPConnection ()
jens@0
    19
- (void) _setStreamProperty: (id)value forKey: (NSString*)key;
jens@0
    20
- (void) _streamOpened: (TCPStream*)stream;
jens@0
    21
- (BOOL) _streamPeerCertAvailable: (TCPStream*)stream;
jens@0
    22
- (void) _stream: (TCPStream*)stream gotError: (NSError*)error;
jens@18
    23
- (void) _streamCanClose: (TCPStream*)stream;
jens@0
    24
- (void) _streamGotEOF: (TCPStream*)stream;
jens@18
    25
- (void) _streamDisconnected: (TCPStream*)stream;
jens@0
    26
@end
jens@19
    27
jens@19
    28
jens@19
    29
@interface TCPStream ()
jens@19
    30
- (void) _unclose;
jens@19
    31
@end
jens@19
    32
jens@26
    33
jens@26
    34
@interface TCPEndpoint ()
jens@26
    35
+ (NSString*) describeCert: (SecCertificateRef)cert;
jens@26
    36
+ (NSString*) describeIdentity: (SecIdentityRef)identity;
jens@26
    37
@end