Changeset 5407
- Timestamp:
- 03/15/08 09:32:27 (4 months ago)
- Files:
-
- WiredAdditions/trunk/WNSocket.h (modified) (1 diff)
- WiredAdditions/trunk/WNSocket.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredAdditions/trunk/WNSocket.h
r5396 r5407 36 36 + (WNSocketTLS *)socketTLSForClient; 37 37 38 - (void)setSSLCiphers:(NSString *)iphers; 38 - (wi_socket_tls_t *)TLS; 39 40 - (void)setSSLCiphers:(NSString *)ciphers; 39 41 40 42 @end WiredAdditions/trunk/WNSocket.m
r5396 r5407 36 36 @interface WNSocketTLS(Private) 37 37 38 - ( wi_socket_tls_t *)_tls;38 - (id)_initForClient; 39 39 40 40 @end … … 43 43 @implementation WNSocketTLS(Private) 44 44 45 - (wi_socket_tls_t *)_tls { 46 return _tls; 45 - (id)_initForClient { 46 wi_pool_t *pool; 47 48 self = [super init]; 49 50 pool = wi_pool_init(wi_pool_alloc()); 51 _tls = wi_socket_tls_init_with_type(wi_socket_tls_alloc(), WI_SOCKET_TLS_CLIENT); 52 wi_release(pool); 53 54 return self; 47 55 } 48 56 … … 53 61 54 62 + (WNSocketTLS *)socketTLSForClient { 55 WNSocketTLS *tls; 56 57 tls = [[self alloc] init]; 58 59 wi_socket_tls_set_type(tls->_tls, WI_SOCKET_TLS_CLIENT); 60 61 return [tls autorelease]; 62 } 63 64 65 66 - (id)init { 67 wi_pool_t *pool; 68 69 self = [super init]; 70 71 pool = wi_pool_init(wi_pool_alloc()); 72 _tls = wi_socket_tls_init(wi_socket_tls_alloc()); 73 wi_release(pool); 74 75 return self; 63 return [[[self alloc] _initForClient] autorelease]; 76 64 } 77 65 … … 82 70 83 71 [super dealloc]; 72 } 73 74 75 76 #pragma mark - 77 78 - (wi_socket_tls_t *)TLS { 79 return _tls; 84 80 } 85 81 … … 369 365 pool = wi_pool_init(wi_pool_alloc()); 370 366 371 if(!wi_socket_connect_tls(_socket, [tls _tls], timeout)) {367 if(!wi_socket_connect_tls(_socket, [tls TLS], timeout)) { 372 368 if(error) { 373 369 *error = [WNError errorWithDomain:WNWiredNetworkingErrorDomain
