30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
*
* @brief A class that provides Transport Layer Security on top of a TCP socket.
*
* This class is a class cluster and returns a suitable OFTLSSocket subclass,
* if available.
*
* Subclasses need to override @ref accept, @ref lowlevelReadIntoBuffer:length:,
* @ref lowlevelWriteBuffer:length:, @ref lowlevelIsAtEndOfStream and
* @ref startTLSForHost:port:. In order to get access to the lowlevel TCP
* methods (you cannot call `super`, as the class is abstract), the private
* methods @ref TCPAccept, @ref lowlevelTCPReadIntoBuffer:length:,
* @ref lowlevelTCPWriteBuffer:length: and @ref lowlevelTCPIsAtEndOfStream are
* provided.
*/
@interface OFTLSSocket: OFTCPSocket
{
bool _verifiesCertificates;
OF_RESERVE_IVARS(OFTLSSocket, 4)
}
|
|
>
>
>
|
|
|
|
<
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
*
* @brief A class that provides Transport Layer Security on top of a TCP socket.
*
* This class is a class cluster and returns a suitable OFTLSSocket subclass,
* if available.
*
* Subclasses need to override @ref accept, @ref lowlevelReadIntoBuffer:length:,
* @ref lowlevelWriteBuffer:length: and @ref startTLSForHost:port:. The method
* @ref hasDataInReadBuffer should be overridden to return `true` if the TLS
* socket has cached unprocessed data internally, while returning
* `[super hasDataInReadBuffer]` if it does not have any unprocessed data. In
* order to get access to the lowlevel TCP methods (you cannot call `super`, as
* the class is abstract), the private methods @ref TCPAccept,
* @ref lowlevelTCPReadIntoBuffer:length: and
* @ref lowlevelTCPWriteBuffer:length: are provided.
*/
@interface OFTLSSocket: OFTCPSocket
{
bool _verifiesCertificates;
OF_RESERVE_IVARS(OFTLSSocket, 4)
}
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
- (size_t)lowlevelTCPReadIntoBuffer: (void *)buffer length: (size_t)length;
/**
* @brief This method should never be called directly. Only subclasses of
* @ref OFTLSSocket are allowed to call it.
*/
- (size_t)lowlevelTCPWriteBuffer: (const void *)buffer length: (size_t)length;
/**
* @brief This method should never be called directly. Only subclasses of
* @ref OFTLSSocket are allowed to call it.
*/
- (bool)lowlevelTCPIsAtEndOfStream;
@end
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The concrete subclass of OFTLSSocket that should be used.
|
<
<
<
<
<
<
|
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
- (size_t)lowlevelTCPReadIntoBuffer: (void *)buffer length: (size_t)length;
/**
* @brief This method should never be called directly. Only subclasses of
* @ref OFTLSSocket are allowed to call it.
*/
- (size_t)lowlevelTCPWriteBuffer: (const void *)buffer length: (size_t)length;
@end
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The concrete subclass of OFTLSSocket that should be used.
|