ObjFW
OFConnectIPSocketFailedException.h
1 /*
2  * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License version 3.0 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13  * version 3.0 for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * version 3.0 along with this program. If not, see
17  * <https://www.gnu.org/licenses/>.
18  */
19 
20 #import "OFConnectSocketFailedException.h"
21 
22 OF_ASSUME_NONNULL_BEGIN
23 
32 OF_SUBCLASSING_RESTRICTED
34 {
35  OFString *_Nullable _host;
36  uint16_t _port;
37 }
38 
42 @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *host;
43 
47 @property (readonly, nonatomic) uint16_t port;
48 
58 + (instancetype)exceptionWithHost: (OFString *)host
59  port: (uint16_t)port
60  socket: (id)socket
61  errNo: (int)errNo;
62 
63 + (instancetype)exceptionWithSocket: (id)socket
64  errNo: (int)errNo OF_UNAVAILABLE;
65 
75 - (instancetype)initWithHost: (OFString *)host
76  port: (uint16_t)port
77  socket: (id)socket
78  errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
79 
80 - (instancetype)initWithSocket: (id)socket errNo: (int)errNo OF_UNAVAILABLE;
81 @end
82 
83 OF_ASSUME_NONNULL_END
OFString * host
The host to which the connection failed.
Definition: OFConnectIPSocketFailedException.h:42
An exception indicating that an IP connection could not be established.
Definition: OFConnectIPSocketFailedException.h:33
A class for handling strings.
Definition: OFString.h:138
An exception indicating that a connection could not be established.
Definition: OFConnectSocketFailedException.h:37