Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/third_party/closure-compiler/node-externs/dns.js
6172 views
1
/*
2
* Copyright 2012 The Closure Compiler Authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
/**
18
* @fileoverview Definitions for node's dns module.
19
* @see http://nodejs.org/api/dns.html
20
* @see https://github.com/joyent/node/blob/master/lib/dns.js
21
* @externs
22
* @author Daniel Wirtz <[email protected]>
23
*/
24
25
/**
26
BEGIN_NODE_INCLUDE
27
var dns = require('dns');
28
END_NODE_INCLUDE
29
*/
30
31
/**
32
* @type {Object.<string,*>}
33
*/
34
var dns = {};
35
36
/**
37
* @param {string} domain
38
* @param {string|function(Error,string,string)} family
39
* @param {function(?Error,string,string)=} callback
40
*/
41
dns.lookup = function(domain, family, callback) {};
42
43
/**
44
* @param {string} domain
45
* @param {string|function(?Error,Array)} rrtype
46
* @param {function(?Error,Array)=}callback
47
*/
48
dns.resolve = function(domain, rrtype, callback) {};
49
50
/**
51
* @param {string} domain
52
* @param {function(?Error,Array)}callback
53
*/
54
dns.resolve4 = function(domain, callback) {};
55
56
/**
57
* @param {string} domain
58
* @param {function(?Error,Array)}callback
59
*/
60
dns.resolve6 = function(domain, callback) {};
61
62
/**
63
* @param {string} domain
64
* @param {function(?Error,Array)}callback
65
*/
66
dns.resolveMx = function(domain, callback) {};
67
68
/**
69
* @param {string} domain
70
* @param {function(?Error,Array)}callback
71
*/
72
dns.resolveTxt = function(domain, callback) {};
73
74
/**
75
* @param {string} domain
76
* @param {function(?Error,Array)}callback
77
*/
78
dns.resolveSrv = function(domain, callback) {};
79
80
/**
81
* @param {string} domain
82
* @param {function(?Error,Array)}callback
83
*/
84
dns.resolveNs = function(domain, callback) {};
85
86
/**
87
* @param {string} domain
88
* @param {function(?Error,Array)}callback
89
*/
90
dns.resolveCname = function(domain, callback) {};
91
92
/**
93
* @param {string} ip
94
* @param {function(?Error,Array)}callback
95
*/
96
dns.reverse = function(ip, callback) {};
97
98
/**
99
* @type {string}
100
* @const
101
*/
102
dns.NODATA = 'ENODATA';
103
104
/**
105
* @type {string}
106
* @const
107
*/
108
dns.FORMERR = 'EFORMERR';
109
110
/**
111
* @type {string}
112
* @const
113
*/
114
dns.SERVFAIL = 'ESERVFAIL';
115
116
/**
117
* @type {string}
118
* @const
119
*/
120
dns.NOTFOUND = 'ENOTFOUND';
121
122
/**
123
* @type {string}
124
* @const
125
*/
126
dns.NOTIMP = 'ENOTIMP';
127
128
/**
129
* @type {string}
130
* @const
131
*/
132
dns.REFUSED = 'EREFUSED';
133
134
/**
135
* @type {string}
136
* @const
137
*/
138
dns.BADQUERY = 'EBADQUERY';
139
140
/**
141
* @type {string}
142
* @const
143
*/
144
dns.BADNAME = 'EBADNAME';
145
146
/**
147
* @type {string}
148
* @const
149
*/
150
dns.BADFAMILY = 'EBADFAMILY';
151
152
/**
153
* @type {string}
154
* @const
155
*/
156
dns.BADRESP = 'EBADRESP';
157
158
/**
159
* @type {string}
160
* @const
161
*/
162
dns.CONNREFUSED = 'ECONNREFUSED';
163
164
/**
165
* @type {string}
166
* @const
167
*/
168
dns.TIMEOUT = 'ETIMEOUT';
169
170
/**
171
* @type {string}
172
* @const
173
*/
174
dns.EOF = 'EOF';
175
176
/**
177
* @type {string}
178
* @const
179
*/
180
dns.FILE = 'EFILE';
181
182
/**
183
* @type {string}
184
* @const
185
*/
186
dns.NOMEM = 'ENOMEM';
187
188
/**
189
* @type {string}
190
* @const
191
*/
192
dns.DESTRUCTION = 'EDESTRUCTION';
193
194
/**
195
* @type {string}
196
* @const
197
*/
198
dns.BADSTR = 'EBADSTR';
199
200
/**
201
* @type {string}
202
* @const
203
*/
204
dns.BADFLAGS = 'EBADFLAGS';
205
206
/**
207
* @type {string}
208
* @const
209
*/
210
dns.NONAME = 'ENONAME';
211
212
/**
213
* @type {string}
214
* @const
215
*/
216
dns.BADHINTS = 'EBADHINTS';
217
218
/**
219
* @type {string}
220
* @const
221
*/
222
dns.NOTINITIALIZED = 'ENOTINITIALIZED';
223
224
/**
225
* @type {string}
226
* @const
227
*/
228
dns.LOADIPHLPAPI = 'ELOADIPHLPAPI';
229
230
/**
231
* @type {string}
232
* @const
233
*/
234
dns.ADDRGETNETWORKPARAMS = 'EADDRGETNETWORKPARAMS';
235
236
/**
237
* @type {string}
238
* @const
239
*/
240
dns.CANCELLED = 'ECANCELLED';
241
242