Modernize the code a little

This commit is contained in:
Jonathan Schleifer 2017-05-14 02:33:26 +02:00
parent c428df9b60
commit cd3d39a9c2
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
8 changed files with 125 additions and 51 deletions

View file

@ -42,6 +42,21 @@
@implementation SSLConnectionFailedException
@synthesize SSLError = _SSLError, verifyResult = _verifyResult;
+ (instancetype)exceptionWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithHost: (OFString *)host
port: (uint16_t)port
socket: (SSLSocket *)socket
@ -67,18 +82,31 @@
verifyResult: verifyResult] autorelease];
}
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
{
OF_INVALID_INIT_METHOD
}
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo
{
OF_INVALID_INIT_METHOD
}
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (SSLSocket *)socket
SSLError: (unsigned long)SSLError
{
self = [super initWithHost: host
port: port
socket: socket];
_SSLError = SSLError;
return self;
return [self initWithHost: host
port: port
socket: socket
SSLError: SSLError
verifyResult: 0];
}
- initWithHost: (OFString *)host