Adjust to ObjFW changes
This commit is contained in:
parent
bdfa70b3e5
commit
b8472e162b
1 changed files with 10 additions and 24 deletions
|
@ -147,36 +147,22 @@ locking_callback(int mode, int n, const char *file, int line)
|
||||||
- (void)socket: (OF_KINDOF(OFTCPSocket *))sock
|
- (void)socket: (OF_KINDOF(OFTCPSocket *))sock
|
||||||
didConnectToHost: (OFString *)host
|
didConnectToHost: (OFString *)host
|
||||||
port: (uint16_t)port
|
port: (uint16_t)port
|
||||||
|
exception: (id)exception
|
||||||
{
|
{
|
||||||
@try {
|
if (exception == nil) {
|
||||||
[sock SSL_startTLSWithExpectedHost: _host
|
@try {
|
||||||
port: _port];
|
[sock SSL_startTLSWithExpectedHost: _host
|
||||||
} @catch (id e) {
|
port: _port];
|
||||||
[_socket setDelegate: _delegate];
|
} @catch (id e) {
|
||||||
[_delegate socket: sock
|
exception = e;
|
||||||
didFailToConnectWithException: e
|
}
|
||||||
host: host
|
|
||||||
port: port];
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[_socket setDelegate: _delegate];
|
[_socket setDelegate: _delegate];
|
||||||
[_delegate socket: sock
|
[_delegate socket: sock
|
||||||
didConnectToHost: host
|
didConnectToHost: host
|
||||||
port: port];
|
port: port
|
||||||
}
|
exception: exception];
|
||||||
|
|
||||||
- (void)socket: (OF_KINDOF(OFTCPSocket *))sock
|
|
||||||
didFailToConnectWithException: (id)exception
|
|
||||||
host: (OFString *)host
|
|
||||||
port: (uint16_t)port
|
|
||||||
{
|
|
||||||
[_socket setDelegate: _delegate];
|
|
||||||
|
|
||||||
return [_delegate socket: sock
|
|
||||||
didFailToConnectWithException: exception
|
|
||||||
host: host
|
|
||||||
port: port];
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Reference in a new issue