23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
@class OFArray OF_GENERIC(ObjectType);
@class OFDictionary OF_GENERIC(KeyType, ObjectType);
@class OFMutableDictionary OF_GENERIC(KeyType, ObjectType);
@class OFNumber;
@class OFUDPSocket;
/*!
* @class OFDNSResolver OFDNSResolver.h ObjFW/OFDNSResolver.h
*
* @brief A class for resolving DNS names.
*/
@interface OFDNSResolver: OFObject
{
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
@class OFArray OF_GENERIC(ObjectType);
@class OFDictionary OF_GENERIC(KeyType, ObjectType);
@class OFMutableDictionary OF_GENERIC(KeyType, ObjectType);
@class OFNumber;
@class OFUDPSocket;
/*!
* @enum of_dns_resolver_error_t OFDNSResolver.h ObjFW/OFDNSResolver.h
*
* @brief An enum describing why resolving a host failed.
*/
typedef enum of_dns_resolver_error_t {
/*! An unknown error */
OF_DNS_RESOLVER_ERROR_UNKNOWN,
/*! The query timed out */
OF_DNS_RESOLVER_ERROR_TIMEOUT,
/*! The query was canceled */
OF_DNS_RESOLVER_ERROR_CANCELED,
/*!
* No result for the specified host with the specified type and class.
*
* This is only used in situations where this is an error, e.g. when
* trying to connect to a host.
*/
OF_DNS_RESOLVER_ERROR_NO_RESULT,
/*! The server considered the query to be malformed */
OF_DNS_RESOLVER_ERROR_SERVER_INVALID_FORMAT,
/*! The server was unable to process due to an internal error */
OF_DNS_RESOLVER_ERROR_SERVER_FAILURE,
/*! The server returned an error that the domain does not exist */
OF_DNS_RESOLVER_ERROR_SERVER_NAME_ERROR,
/*! The server does not have support for the requested query */
OF_DNS_RESOLVER_ERROR_SERVER_NOT_IMPLEMENTED,
/*! The server refused the query */
OF_DNS_RESOLVER_ERROR_SERVER_REFUSED
} of_dns_resolver_error_t;
/*!
* @class OFDNSResolver OFDNSResolver.h ObjFW/OFDNSResolver.h
*
* @brief A class for resolving DNS names.
*/
@interface OFDNSResolver: OFObject
{
|
122
123
124
125
126
127
128
129
130
131
|
*/
- (void)asyncResolveHost: (OFString *)host
recordClass: (of_dns_resource_record_class_t)recordClass
recordType: (of_dns_resource_record_type_t)recordType
target: (id)target
selector: (SEL)selector
context: (nullable id)context;
@end
OF_ASSUME_NONNULL_END
|
>
>
>
>
>
|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
*/
- (void)asyncResolveHost: (OFString *)host
recordClass: (of_dns_resource_record_class_t)recordClass
recordType: (of_dns_resource_record_type_t)recordType
target: (id)target
selector: (SEL)selector
context: (nullable id)context;
/*!
* @brief Closes all sockets and cancels all ongoing requests.
*/
- (void)close;
@end
OF_ASSUME_NONNULL_END
|