rbs 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +5 -0
- data/CHANGELOG.md +23 -0
- data/README.md +6 -1
- data/core/array.rbs +2866 -1086
- data/core/basic_object.rbs +150 -30
- data/core/binding.rbs +33 -0
- data/core/builtin.rbs +4 -4
- data/core/class.rbs +43 -5
- data/core/comparable.rbs +57 -0
- data/core/complex.rbs +170 -4
- data/core/constants.rbs +51 -0
- data/core/deprecated.rbs +7 -0
- data/core/dir.rbs +305 -20
- data/core/encoding.rbs +472 -77
- data/core/enumerable.rbs +2173 -234
- data/core/enumerator.rbs +448 -182
- data/core/env.rbs +448 -1
- data/core/errno.rbs +1 -10
- data/core/errors.rbs +152 -2
- data/core/exception.rbs +201 -127
- data/core/false_class.rbs +27 -0
- data/core/fiber.rbs +118 -37
- data/core/fiber_error.rbs +8 -9
- data/core/file.rbs +1059 -139
- data/core/file_test.rbs +287 -32
- data/core/float.rbs +776 -300
- data/core/gc.rbs +185 -34
- data/core/global_variables.rbs +5 -1
- data/core/hash.rbs +1582 -649
- data/core/integer.rbs +974 -204
- data/core/io/buffer.rbs +710 -0
- data/core/io/wait.rbs +29 -8
- data/core/io.rbs +2438 -417
- data/core/kernel.rbs +2315 -316
- data/core/marshal.rbs +37 -2
- data/core/match_data.rbs +123 -6
- data/core/math.rbs +126 -6
- data/core/method.rbs +226 -102
- data/core/module.rbs +421 -45
- data/core/nil_class.rbs +64 -0
- data/core/numeric.rbs +620 -142
- data/core/object.rbs +453 -81
- data/core/object_space.rbs +92 -2
- data/core/proc.rbs +482 -285
- data/core/process.rbs +443 -34
- data/core/ractor.rbs +232 -9
- data/core/random.rbs +151 -52
- data/core/range.rbs +885 -160
- data/core/rational.rbs +122 -6
- data/core/rb_config.rbs +14 -4
- data/core/refinement.rbs +44 -0
- data/core/regexp.rbs +156 -14
- data/core/ruby_vm.rbs +42 -3
- data/core/signal.rbs +78 -39
- data/core/string.rbs +2123 -567
- data/core/string_io.rbs +204 -0
- data/core/struct.rbs +283 -28
- data/core/symbol.rbs +304 -30
- data/core/thread.rbs +1288 -688
- data/core/thread_group.rbs +66 -10
- data/core/time.rbs +643 -217
- data/core/trace_point.rbs +100 -12
- data/core/true_class.rbs +24 -0
- data/core/unbound_method.rbs +73 -7
- data/core/warning.rbs +37 -12
- data/docs/CONTRIBUTING.md +40 -34
- data/docs/stdlib.md +3 -102
- data/lib/rbs/annotate/annotations.rb +197 -0
- data/lib/rbs/annotate/formatter.rb +80 -0
- data/lib/rbs/annotate/rdoc_annotator.rb +398 -0
- data/lib/rbs/annotate/rdoc_source.rb +120 -0
- data/lib/rbs/annotate.rb +6 -0
- data/lib/rbs/cli.rb +45 -1
- data/lib/rbs/definition_builder.rb +5 -1
- data/lib/rbs/location_aux.rb +12 -0
- data/lib/rbs/prototype/rb.rb +12 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/annotate/annotations.rbs +102 -0
- data/sig/annotate/formatter.rbs +24 -0
- data/sig/annotate/rdoc_annotater.rbs +82 -0
- data/sig/annotate/rdoc_source.rbs +30 -0
- data/sig/cli.rbs +2 -0
- data/sig/collection/{collections.rbs → sources.rbs} +0 -0
- data/sig/location.rbs +6 -0
- data/sig/method_types.rbs +5 -1
- data/sig/polyfill.rbs +78 -0
- data/stdlib/abbrev/0/abbrev.rbs +6 -0
- data/stdlib/abbrev/0/array.rbs +26 -0
- data/stdlib/base64/0/base64.rbs +31 -0
- data/stdlib/benchmark/0/benchmark.rbs +74 -3
- data/stdlib/bigdecimal/0/big_decimal.rbs +614 -165
- data/stdlib/bigdecimal-math/0/big_math.rbs +41 -64
- data/stdlib/cgi/0/core.rbs +59 -0
- data/stdlib/coverage/0/coverage.rbs +164 -2
- data/stdlib/csv/0/csv.rbs +2862 -398
- data/stdlib/date/0/date.rbs +483 -25
- data/stdlib/date/0/date_time.rbs +187 -12
- data/stdlib/dbm/0/dbm.rbs +152 -17
- data/stdlib/digest/0/digest.rbs +146 -0
- data/stdlib/erb/0/erb.rbs +65 -245
- data/stdlib/fiber/0/fiber.rbs +73 -91
- data/stdlib/fileutils/0/fileutils.rbs +301 -1
- data/stdlib/find/0/find.rbs +9 -0
- data/stdlib/forwardable/0/forwardable.rbs +65 -1
- data/stdlib/io-console/0/io-console.rbs +227 -15
- data/stdlib/ipaddr/0/ipaddr.rbs +161 -0
- data/stdlib/json/0/json.rbs +1146 -144
- data/stdlib/logger/0/formatter.rbs +24 -0
- data/stdlib/logger/0/log_device.rbs +64 -0
- data/stdlib/logger/0/logger.rbs +165 -13
- data/stdlib/logger/0/period.rbs +10 -0
- data/stdlib/logger/0/severity.rbs +26 -0
- data/stdlib/monitor/0/monitor.rbs +163 -0
- data/stdlib/mutex_m/0/mutex_m.rbs +35 -6
- data/stdlib/net-http/0/net-http.rbs +1492 -683
- data/stdlib/nkf/0/nkf.rbs +372 -0
- data/stdlib/objspace/0/objspace.rbs +149 -90
- data/stdlib/openssl/0/openssl.rbs +8108 -71
- data/stdlib/optparse/0/optparse.rbs +487 -19
- data/stdlib/pathname/0/pathname.rbs +425 -124
- data/stdlib/prettyprint/0/prettyprint.rbs +120 -99
- data/stdlib/prime/0/integer-extension.rbs +20 -2
- data/stdlib/prime/0/prime.rbs +88 -21
- data/stdlib/pstore/0/pstore.rbs +102 -0
- data/stdlib/pty/0/pty.rbs +64 -14
- data/stdlib/resolv/0/resolv.rbs +420 -31
- data/stdlib/rubygems/0/basic_specification.rbs +4 -1
- data/stdlib/rubygems/0/config_file.rbs +33 -1
- data/stdlib/rubygems/0/dependency_installer.rbs +4 -3
- data/stdlib/rubygems/0/installer.rbs +13 -1
- data/stdlib/rubygems/0/path_support.rbs +4 -1
- data/stdlib/rubygems/0/platform.rbs +5 -1
- data/stdlib/rubygems/0/request_set.rbs +44 -2
- data/stdlib/rubygems/0/requirement.rbs +65 -2
- data/stdlib/rubygems/0/rubygems.rbs +407 -0
- data/stdlib/rubygems/0/source_list.rbs +13 -0
- data/stdlib/rubygems/0/specification.rbs +21 -1
- data/stdlib/rubygems/0/stream_ui.rbs +3 -1
- data/stdlib/rubygems/0/uninstaller.rbs +8 -1
- data/stdlib/rubygems/0/version.rbs +60 -157
- data/stdlib/securerandom/0/securerandom.rbs +44 -0
- data/stdlib/set/0/set.rbs +420 -106
- data/stdlib/shellwords/0/shellwords.rbs +55 -77
- data/stdlib/singleton/0/singleton.rbs +20 -0
- data/stdlib/socket/0/addrinfo.rbs +210 -9
- data/stdlib/socket/0/basic_socket.rbs +103 -11
- data/stdlib/socket/0/ip_socket.rbs +31 -9
- data/stdlib/socket/0/socket.rbs +586 -38
- data/stdlib/socket/0/tcp_server.rbs +22 -2
- data/stdlib/socket/0/tcp_socket.rbs +12 -1
- data/stdlib/socket/0/udp_socket.rbs +25 -2
- data/stdlib/socket/0/unix_server.rbs +22 -2
- data/stdlib/socket/0/unix_socket.rbs +45 -5
- data/stdlib/strscan/0/string_scanner.rbs +210 -9
- data/stdlib/tempfile/0/tempfile.rbs +58 -10
- data/stdlib/time/0/time.rbs +208 -116
- data/stdlib/timeout/0/timeout.rbs +10 -0
- data/stdlib/tmpdir/0/tmpdir.rbs +13 -4
- data/stdlib/tsort/0/cyclic.rbs +1 -0
- data/stdlib/tsort/0/interfaces.rbs +1 -0
- data/stdlib/tsort/0/tsort.rbs +42 -0
- data/stdlib/uri/0/common.rbs +57 -8
- data/stdlib/uri/0/file.rbs +55 -109
- data/stdlib/uri/0/ftp.rbs +6 -3
- data/stdlib/uri/0/generic.rbs +556 -327
- data/stdlib/uri/0/http.rbs +26 -115
- data/stdlib/uri/0/https.rbs +8 -102
- data/stdlib/uri/0/ldap.rbs +143 -137
- data/stdlib/uri/0/ldaps.rbs +8 -102
- data/stdlib/uri/0/mailto.rbs +3 -0
- data/stdlib/uri/0/rfc2396_parser.rbs +66 -26
- data/stdlib/uri/0/ws.rbs +6 -3
- data/stdlib/uri/0/wss.rbs +5 -3
- data/stdlib/yaml/0/dbm.rbs +151 -87
- data/stdlib/yaml/0/store.rbs +6 -0
- data/stdlib/zlib/0/zlib.rbs +90 -31
- metadata +17 -5
- data/lib/rbs/location.rb +0 -221
data/stdlib/socket/0/socket.rbs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# <!-- rdoc-file=ext/socket/socket.c -->
|
1
2
|
# Class `Socket` provides access to the underlying operating system socket
|
2
3
|
# implementations. It can be used to provide more operating system specific
|
3
4
|
# functionality than the protocol-specific socket classes.
|
@@ -110,7 +111,12 @@
|
|
110
111
|
#
|
111
112
|
# Much material in this documentation is taken with permission from *Programming
|
112
113
|
# Ruby* from The Pragmatic Bookshelf.
|
114
|
+
#
|
113
115
|
class Socket < BasicSocket
|
116
|
+
# <!--
|
117
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
118
|
+
# - accept_loop(*sockets) { |socket, client_addrinfo| ... }
|
119
|
+
# -->
|
114
120
|
# yield socket and client address for each a connection accepted via given
|
115
121
|
# sockets.
|
116
122
|
#
|
@@ -123,6 +129,10 @@ class Socket < BasicSocket
|
|
123
129
|
#
|
124
130
|
def self.accept_loop: (*_ToIO sockets) { (Socket) -> void } -> void
|
125
131
|
|
132
|
+
# <!--
|
133
|
+
# rdoc-file=ext/socket/socket.c
|
134
|
+
# - Socket.getaddrinfo(nodename, servname[, family[, socktype[, protocol[, flags[, reverse_lookup]]]]]) => array
|
135
|
+
# -->
|
126
136
|
# Obtains address information for *nodename*:*servname*.
|
127
137
|
#
|
128
138
|
# Note that Addrinfo.getaddrinfo provides the same functionality in an object
|
@@ -149,13 +159,17 @@ class Socket < BasicSocket
|
|
149
159
|
# below. If *reverse_lookup* is omitted, the default value is `nil`.
|
150
160
|
#
|
151
161
|
# +true+, +:hostname+: hostname is obtained from numeric address using reverse lookup, which may take a time.
|
152
|
-
# +false+, +:numeric+: hostname is same as numeric address.
|
162
|
+
# +false+, +:numeric+: hostname is the same as numeric address.
|
153
163
|
# +nil+: obey to the current +do_not_reverse_lookup+ flag.
|
154
164
|
#
|
155
165
|
# If Addrinfo object is preferred, use Addrinfo.getaddrinfo.
|
156
166
|
#
|
157
|
-
def self.getaddrinfo: (String peer, String | Integer | nil protocol, ?
|
167
|
+
def self.getaddrinfo: (String peer, String | Integer | nil protocol, ?Integer | Symbol | nil family, ?Integer | Symbol | nil socktype, ?Integer | Symbol | nil protocol, ?Integer | nil flags) -> [ String, Integer, String, String, Integer, Integer, Integer ]
|
158
168
|
|
169
|
+
# <!--
|
170
|
+
# rdoc-file=ext/socket/socket.c
|
171
|
+
# - Socket.gethostbyaddr(address_string [, address_family]) => hostent
|
172
|
+
# -->
|
159
173
|
# Use Addrinfo#getnameinfo instead. This method is deprecated for the following
|
160
174
|
# reasons:
|
161
175
|
#
|
@@ -177,8 +191,12 @@ class Socket < BasicSocket
|
|
177
191
|
# #=> ["localhost", ["ip6-localhost", "ip6-loopback"], 10,
|
178
192
|
# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"]
|
179
193
|
#
|
180
|
-
def self.gethostbyaddr: (String ip) -> [String, Array[String], Integer, String]
|
194
|
+
def self.gethostbyaddr: (String ip) -> [ String, Array[String], Integer, String ]
|
181
195
|
|
196
|
+
# <!--
|
197
|
+
# rdoc-file=ext/socket/socket.c
|
198
|
+
# - Socket.gethostbyname(hostname) => [official_hostname, alias_hostnames, address_family, *address_list]
|
199
|
+
# -->
|
182
200
|
# Use Addrinfo.getaddrinfo instead. This method is deprecated for the following
|
183
201
|
# reasons:
|
184
202
|
#
|
@@ -195,8 +213,12 @@ class Socket < BasicSocket
|
|
195
213
|
#
|
196
214
|
# p Socket.gethostbyname("hal") #=> ["localhost", ["hal"], 2, "\x7F\x00\x00\x01"]
|
197
215
|
#
|
198
|
-
def self.gethostbyname: (String name) -> [String, Array[String], Integer, String]
|
216
|
+
def self.gethostbyname: (String name) -> [ String, Array[String], Integer, String ]
|
199
217
|
|
218
|
+
# <!--
|
219
|
+
# rdoc-file=ext/socket/socket.c
|
220
|
+
# - Socket.gethostname => hostname
|
221
|
+
# -->
|
200
222
|
# Returns the hostname.
|
201
223
|
#
|
202
224
|
# p Socket.gethostname #=> "hal"
|
@@ -207,6 +229,10 @@ class Socket < BasicSocket
|
|
207
229
|
#
|
208
230
|
def self.gethostname: () -> String
|
209
231
|
|
232
|
+
# <!--
|
233
|
+
# rdoc-file=ext/socket/ifaddr.c
|
234
|
+
# - Socket.getifaddrs => [ifaddr1, ...]
|
235
|
+
# -->
|
210
236
|
# Returns an array of interface addresses. An element of the array is an
|
211
237
|
# instance of Socket::Ifaddr.
|
212
238
|
#
|
@@ -243,6 +269,10 @@ class Socket < BasicSocket
|
|
243
269
|
#
|
244
270
|
def self.getifaddrs: () -> Array[Socket::Ifaddr]
|
245
271
|
|
272
|
+
# <!--
|
273
|
+
# rdoc-file=ext/socket/socket.c
|
274
|
+
# - Socket.getnameinfo(sockaddr [, flags]) => [hostname, servicename]
|
275
|
+
# -->
|
246
276
|
# Obtains name information for *sockaddr*.
|
247
277
|
#
|
248
278
|
# *sockaddr* should be one of follows.
|
@@ -261,9 +291,15 @@ class Socket < BasicSocket
|
|
261
291
|
#
|
262
292
|
# If Addrinfo object is preferred, use Addrinfo#getnameinfo.
|
263
293
|
#
|
264
|
-
def self.getnameinfo: ([String, Integer, String]) -> Array[String]
|
265
|
-
| ([String, Integer, String, String]) -> Array[String]
|
294
|
+
def self.getnameinfo: ([ String, Integer, String ]) -> Array[String]
|
295
|
+
| ([ String, Integer, String, String ]) -> Array[String]
|
266
296
|
| (String sockaddr) -> Array[String]
|
297
|
+
|
298
|
+
# <!--
|
299
|
+
# rdoc-file=ext/socket/socket.c
|
300
|
+
# - Socket.getservbyname(service_name) => port_number
|
301
|
+
# - Socket.getservbyname(service_name, protocol_name) => port_number
|
302
|
+
# -->
|
267
303
|
# Obtains the port number for *service_name*.
|
268
304
|
#
|
269
305
|
# If *protocol_name* is not given, "tcp" is assumed.
|
@@ -272,10 +308,13 @@ class Socket < BasicSocket
|
|
272
308
|
# Socket.getservbyname("shell") #=> 514
|
273
309
|
# Socket.getservbyname("syslog", "udp") #=> 514
|
274
310
|
#
|
275
|
-
#
|
276
311
|
def self.getservbyname: (String service_proto) -> Integer
|
277
312
|
| (String service_proto, String layer4_proto) -> Integer
|
278
313
|
|
314
|
+
# <!--
|
315
|
+
# rdoc-file=ext/socket/socket.c
|
316
|
+
# - Socket.getservbyport(port [, protocol_name]) => service
|
317
|
+
# -->
|
279
318
|
# Obtains the port number for *port*.
|
280
319
|
#
|
281
320
|
# If *protocol_name* is not given, "tcp" is assumed.
|
@@ -287,6 +326,10 @@ class Socket < BasicSocket
|
|
287
326
|
def self.getservbyport: (Integer service_port) -> String
|
288
327
|
| (Integer service_port, String layer4_proto) -> String
|
289
328
|
|
329
|
+
# <!--
|
330
|
+
# rdoc-file=ext/socket/socket.c
|
331
|
+
# - Socket.ip_address_list => array
|
332
|
+
# -->
|
290
333
|
# Returns local IP addresses as an array.
|
291
334
|
#
|
292
335
|
# The array contains Addrinfo objects.
|
@@ -299,6 +342,11 @@ class Socket < BasicSocket
|
|
299
342
|
#
|
300
343
|
def self.ip_address_list: () -> Array[Addrinfo]
|
301
344
|
|
345
|
+
# <!--
|
346
|
+
# rdoc-file=ext/socket/socket.c
|
347
|
+
# - Socket.sockaddr_in(port, host) => sockaddr
|
348
|
+
# - Socket.pack_sockaddr_in(port, host) => sockaddr
|
349
|
+
# -->
|
302
350
|
# Packs *port* and *host* as an AF_INET/AF_INET6 sockaddr string.
|
303
351
|
#
|
304
352
|
# Socket.sockaddr_in(80, "127.0.0.1")
|
@@ -307,16 +355,24 @@ class Socket < BasicSocket
|
|
307
355
|
# Socket.sockaddr_in(80, "::1")
|
308
356
|
# #=> "\n\x00\x00P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
|
309
357
|
#
|
310
|
-
#
|
311
358
|
def self.pack_sockaddr_in: (Integer port, String ip) -> String
|
312
359
|
|
360
|
+
# <!--
|
361
|
+
# rdoc-file=ext/socket/socket.c
|
362
|
+
# - Socket.sockaddr_un(path) => sockaddr
|
363
|
+
# - Socket.pack_sockaddr_un(path) => sockaddr
|
364
|
+
# -->
|
313
365
|
# Packs *path* as an AF_UNIX sockaddr string.
|
314
366
|
#
|
315
367
|
# Socket.sockaddr_un("/tmp/sock") #=> "\x01\x00/tmp/sock\x00\x00..."
|
316
368
|
#
|
317
|
-
#
|
318
369
|
def self.pack_sockaddr_un: (String sockpath) -> String
|
319
370
|
|
371
|
+
# <!--
|
372
|
+
# rdoc-file=ext/socket/socket.c
|
373
|
+
# - Socket.pair(domain, type, protocol) => [socket1, socket2]
|
374
|
+
# - Socket.socketpair(domain, type, protocol) => [socket1, socket2]
|
375
|
+
# -->
|
320
376
|
# Creates a pair of sockets connected each other.
|
321
377
|
#
|
322
378
|
# *domain* should be a communications domain such as: :INET, :INET6, :UNIX, etc.
|
@@ -340,9 +396,13 @@ class Socket < BasicSocket
|
|
340
396
|
# p s2.recv(10) #=> "a"
|
341
397
|
# p s2.recv(10) #=> "b"
|
342
398
|
#
|
343
|
-
|
344
|
-
def self.pair: (Symbol sockdomain, Symbol socktype, Integer protocol) -> [instance, instance]
|
399
|
+
def self.pair: (Symbol sockdomain, Symbol socktype, Integer protocol) -> [ instance, instance ]
|
345
400
|
|
401
|
+
# <!--
|
402
|
+
# rdoc-file=ext/socket/socket.c
|
403
|
+
# - Socket.sockaddr_in(port, host) => sockaddr
|
404
|
+
# - Socket.pack_sockaddr_in(port, host) => sockaddr
|
405
|
+
# -->
|
346
406
|
# Packs *port* and *host* as an AF_INET/AF_INET6 sockaddr string.
|
347
407
|
#
|
348
408
|
# Socket.sockaddr_in(80, "127.0.0.1")
|
@@ -351,16 +411,24 @@ class Socket < BasicSocket
|
|
351
411
|
# Socket.sockaddr_in(80, "::1")
|
352
412
|
# #=> "\n\x00\x00P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
|
353
413
|
#
|
354
|
-
#
|
355
414
|
def self.sockaddr_in: (Integer port, String ip) -> String
|
356
415
|
|
416
|
+
# <!--
|
417
|
+
# rdoc-file=ext/socket/socket.c
|
418
|
+
# - Socket.sockaddr_un(path) => sockaddr
|
419
|
+
# - Socket.pack_sockaddr_un(path) => sockaddr
|
420
|
+
# -->
|
357
421
|
# Packs *path* as an AF_UNIX sockaddr string.
|
358
422
|
#
|
359
423
|
# Socket.sockaddr_un("/tmp/sock") #=> "\x01\x00/tmp/sock\x00\x00..."
|
360
424
|
#
|
361
|
-
#
|
362
425
|
def self.sockaddr_un: (String sockpath) -> String
|
363
426
|
|
427
|
+
# <!--
|
428
|
+
# rdoc-file=ext/socket/socket.c
|
429
|
+
# - Socket.pair(domain, type, protocol) => [socket1, socket2]
|
430
|
+
# - Socket.socketpair(domain, type, protocol) => [socket1, socket2]
|
431
|
+
# -->
|
364
432
|
# Creates a pair of sockets connected each other.
|
365
433
|
#
|
366
434
|
# *domain* should be a communications domain such as: :INET, :INET6, :UNIX, etc.
|
@@ -384,9 +452,13 @@ class Socket < BasicSocket
|
|
384
452
|
# p s2.recv(10) #=> "a"
|
385
453
|
# p s2.recv(10) #=> "b"
|
386
454
|
#
|
387
|
-
|
388
|
-
def self.socketpair: (Symbol sockdomain, Symbol socktype, Integer protocol) -> [instance, instance]
|
455
|
+
def self.socketpair: (Symbol sockdomain, Symbol socktype, Integer protocol) -> [ instance, instance ]
|
389
456
|
|
457
|
+
# <!--
|
458
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
459
|
+
# - Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) {|socket| ... }
|
460
|
+
# - Socket.tcp(host, port, local_host=nil, local_port=nil, [opts])
|
461
|
+
# -->
|
390
462
|
# creates a new socket object connected to host:port using TCP/IP.
|
391
463
|
#
|
392
464
|
# If local_host:local_port is given, the socket is bound to it.
|
@@ -411,10 +483,13 @@ class Socket < BasicSocket
|
|
411
483
|
# puts sock.read
|
412
484
|
# }
|
413
485
|
#
|
414
|
-
#
|
415
486
|
def self.tcp: (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Numeric, ?connect_timeout: Numeric) -> instance
|
416
487
|
| (String host, Integer port, ?String local_host, ?Integer local_port, ?resolv_timeout: Numeric, ?connect_timeout: Numeric) { (instance) -> void } -> void
|
417
488
|
|
489
|
+
# <!--
|
490
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
491
|
+
# - tcp_server_loop(host=nil, port) { |socket, client_addrinfo| ... }
|
492
|
+
# -->
|
418
493
|
# creates a TCP/IP server on *port* and calls the block for each connection
|
419
494
|
# accepted. The block is called with a socket and a client_address as an
|
420
495
|
# Addrinfo object.
|
@@ -459,6 +534,10 @@ class Socket < BasicSocket
|
|
459
534
|
#
|
460
535
|
def self.tcp_server_loop: (?String host, Integer port) { (instance, Addrinfo) -> void } -> void
|
461
536
|
|
537
|
+
# <!--
|
538
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
539
|
+
# - tcp_server_sockets(host=nil, port) { |sockets| ... }
|
540
|
+
# -->
|
462
541
|
# creates TCP/IP server sockets for *host* and *port*. *host* is optional.
|
463
542
|
#
|
464
543
|
# If no block given, it returns an array of listening sockets.
|
@@ -492,6 +571,11 @@ class Socket < BasicSocket
|
|
492
571
|
def self.tcp_server_sockets: (?String host, Integer port) -> Array[TCPServer]
|
493
572
|
| (?String host, Integer port) { (Array[TCPServer]) -> void } -> void
|
494
573
|
|
574
|
+
# <!--
|
575
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
576
|
+
# - Socket.udp_server_loop(port) {|msg, msg_src| ... }
|
577
|
+
# - Socket.udp_server_loop(host, port) {|msg, msg_src| ... }
|
578
|
+
# -->
|
495
579
|
# creates a UDP/IP server on *port* and calls the block for each message
|
496
580
|
# arrived. The block is called with the message and its source information.
|
497
581
|
#
|
@@ -507,9 +591,12 @@ class Socket < BasicSocket
|
|
507
591
|
# msg_src.reply msg
|
508
592
|
# }
|
509
593
|
#
|
510
|
-
#
|
511
594
|
def self.udp_server_loop: (?String host, Integer port) { (String, Socket::UDPSource) -> void } -> void
|
512
595
|
|
596
|
+
# <!--
|
597
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
598
|
+
# - Socket.udp_server_loop_on(sockets) {|msg, msg_src| ... }
|
599
|
+
# -->
|
513
600
|
# Run UDP/IP server loop on the given sockets.
|
514
601
|
#
|
515
602
|
# The return value of Socket.udp_server_sockets is appropriate for the argument.
|
@@ -518,6 +605,10 @@ class Socket < BasicSocket
|
|
518
605
|
#
|
519
606
|
def self.udp_server_loop_on: (UDPSocket sockets) { (String, Socket::UDPSource) -> void } -> void
|
520
607
|
|
608
|
+
# <!--
|
609
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
610
|
+
# - Socket.udp_server_recv(sockets) {|msg, msg_src| ... }
|
611
|
+
# -->
|
521
612
|
# Receive UDP/IP packets from the given *sockets*. For each packet received, the
|
522
613
|
# block is called.
|
523
614
|
#
|
@@ -536,6 +627,10 @@ class Socket < BasicSocket
|
|
536
627
|
#
|
537
628
|
def self.udp_server_recv: (Array[UDPSocket] sockets) { (String, Socket::UDPSource) -> void } -> void
|
538
629
|
|
630
|
+
# <!--
|
631
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
632
|
+
# - Socket.udp_server_sockets([host, ] port)
|
633
|
+
# -->
|
539
634
|
# Creates UDP/IP sockets for a UDP server.
|
540
635
|
#
|
541
636
|
# If no block given, it returns an array of sockets.
|
@@ -556,6 +651,10 @@ class Socket < BasicSocket
|
|
556
651
|
#
|
557
652
|
def self.udp_server_sockets: (?String host, Integer port) { (UDPSocket) -> void } -> void
|
558
653
|
|
654
|
+
# <!--
|
655
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
656
|
+
# - unix(path) { |socket| ... }
|
657
|
+
# -->
|
559
658
|
# creates a new socket connected to path using UNIX socket socket.
|
560
659
|
#
|
561
660
|
# If a block is given, the block is called with the socket. The value of the
|
@@ -573,6 +672,10 @@ class Socket < BasicSocket
|
|
573
672
|
def self.unix: (String path) -> UNIXSocket
|
574
673
|
| (String path) { (UNIXSocket) -> void } -> void
|
575
674
|
|
675
|
+
# <!--
|
676
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
677
|
+
# - unix_server_loop(path) { |socket, client_addrinfo| ... }
|
678
|
+
# -->
|
576
679
|
# creates a UNIX socket server on *path*. It calls the block for each socket
|
577
680
|
# accepted.
|
578
681
|
#
|
@@ -599,6 +702,10 @@ class Socket < BasicSocket
|
|
599
702
|
#
|
600
703
|
def self.unix_server_loop: (String path) { (UNIXSocket, Addrinfo) -> void } -> void
|
601
704
|
|
705
|
+
# <!--
|
706
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
707
|
+
# - unix_server_socket(path) { |s| ... }
|
708
|
+
# -->
|
602
709
|
# creates a UNIX server socket on *path*
|
603
710
|
#
|
604
711
|
# If no block given, it returns a listening socket.
|
@@ -619,6 +726,10 @@ class Socket < BasicSocket
|
|
619
726
|
def self.unix_server_socket: (String path) -> Socket
|
620
727
|
| (String path) { (Socket) -> void } -> void
|
621
728
|
|
729
|
+
# <!--
|
730
|
+
# rdoc-file=ext/socket/socket.c
|
731
|
+
# - Socket.unpack_sockaddr_in(sockaddr) => [port, ip_address]
|
732
|
+
# -->
|
622
733
|
# Unpacks *sockaddr* into port and ip_address.
|
623
734
|
#
|
624
735
|
# *sockaddr* should be a string or an addrinfo for AF_INET/AF_INET6.
|
@@ -627,8 +738,12 @@ class Socket < BasicSocket
|
|
627
738
|
# p sockaddr #=> "\x02\x00\x00P\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
|
628
739
|
# p Socket.unpack_sockaddr_in(sockaddr) #=> [80, "127.0.0.1"]
|
629
740
|
#
|
630
|
-
def self.unpack_sockaddr_in: (String | Addrinfo sockaddr) -> [Integer, String]
|
741
|
+
def self.unpack_sockaddr_in: (String | Addrinfo sockaddr) -> [ Integer, String ]
|
631
742
|
|
743
|
+
# <!--
|
744
|
+
# rdoc-file=ext/socket/socket.c
|
745
|
+
# - Socket.unpack_sockaddr_un(sockaddr) => path
|
746
|
+
# -->
|
632
747
|
# Unpacks *sockaddr* into path.
|
633
748
|
#
|
634
749
|
# *sockaddr* should be a string or an addrinfo for AF_UNIX.
|
@@ -640,6 +755,10 @@ class Socket < BasicSocket
|
|
640
755
|
|
641
756
|
public
|
642
757
|
|
758
|
+
# <!--
|
759
|
+
# rdoc-file=ext/socket/socket.c
|
760
|
+
# - socket.accept => [client_socket, client_addrinfo]
|
761
|
+
# -->
|
643
762
|
# Accepts a next connection. Returns a new Socket object and Addrinfo object.
|
644
763
|
#
|
645
764
|
# serv = Socket.new(:INET, :STREAM, 0)
|
@@ -648,8 +767,12 @@ class Socket < BasicSocket
|
|
648
767
|
# c.connect(serv.connect_address)
|
649
768
|
# p serv.accept #=> [#<Socket:fd 6>, #<Addrinfo: 127.0.0.1:48555 TCP>]
|
650
769
|
#
|
651
|
-
def accept: () -> [Socket, Addrinfo]
|
770
|
+
def accept: () -> [ Socket, Addrinfo ]
|
652
771
|
|
772
|
+
# <!--
|
773
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
774
|
+
# - socket.accept_nonblock([options]) => [client_socket, client_addrinfo]
|
775
|
+
# -->
|
653
776
|
# Accepts an incoming connection using accept(2) after O_NONBLOCK is set for the
|
654
777
|
# underlying file descriptor. It returns an array containing the accepted socket
|
655
778
|
# for the incoming connection, *client_socket*, and an Addrinfo,
|
@@ -700,9 +823,12 @@ class Socket < BasicSocket
|
|
700
823
|
# ### See
|
701
824
|
# * Socket#accept
|
702
825
|
#
|
703
|
-
|
704
|
-
def accept_nonblock: (?exception: boolish) -> ([Socket, Addrinfo] | :wait_readable)
|
826
|
+
def accept_nonblock: (?exception: boolish) -> ([ Socket, Addrinfo ] | :wait_readable)
|
705
827
|
|
828
|
+
# <!--
|
829
|
+
# rdoc-file=ext/socket/socket.c
|
830
|
+
# - socket.bind(local_sockaddr) => 0
|
831
|
+
# -->
|
706
832
|
# Binds to the given local address.
|
707
833
|
#
|
708
834
|
# ### Parameter
|
@@ -790,9 +916,12 @@ class Socket < BasicSocket
|
|
790
916
|
# * bind manual pages on unix-based systems
|
791
917
|
# * bind function in Microsoft's Winsock functions reference
|
792
918
|
#
|
793
|
-
#
|
794
919
|
def bind: (String | Addrinfo local_sockaddr) -> void
|
795
920
|
|
921
|
+
# <!--
|
922
|
+
# rdoc-file=ext/socket/socket.c
|
923
|
+
# - socket.connect(remote_sockaddr) => 0
|
924
|
+
# -->
|
796
925
|
# Requests a connection to be made on the given `remote_sockaddr`. Returns 0 if
|
797
926
|
# successful, otherwise an exception is raised.
|
798
927
|
#
|
@@ -852,8 +981,8 @@ class Socket < BasicSocket
|
|
852
981
|
# connected
|
853
982
|
# * Errno::EPROTOTYPE - the *sockaddr* has a different type than the socket
|
854
983
|
# bound to the specified peer address
|
855
|
-
# * Errno::ETIMEDOUT - the attempt to connect
|
856
|
-
# made.
|
984
|
+
# * Errno::ETIMEDOUT - the attempt to connect timed out before a connection
|
985
|
+
# was made.
|
857
986
|
#
|
858
987
|
#
|
859
988
|
# On unix-based systems if the address family of the calling `socket` is AF_UNIX
|
@@ -895,8 +1024,8 @@ class Socket < BasicSocket
|
|
895
1024
|
# * Errno::EHOSTUNREACH - no route to the network is present
|
896
1025
|
# * Errno::ENOBUFS - no buffer space is available
|
897
1026
|
# * Errno::ENOTSOCK - the `socket` argument does not refer to a socket
|
898
|
-
# * Errno::ETIMEDOUT - the attempt to connect
|
899
|
-
# made.
|
1027
|
+
# * Errno::ETIMEDOUT - the attempt to connect timed out before a connection
|
1028
|
+
# was made.
|
900
1029
|
# * Errno::EWOULDBLOCK - the socket is marked as nonblocking and the
|
901
1030
|
# connection cannot be completed immediately
|
902
1031
|
# * Errno::EACCES - the attempt to connect the datagram socket to the
|
@@ -907,9 +1036,12 @@ class Socket < BasicSocket
|
|
907
1036
|
# * connect manual pages on unix-based systems
|
908
1037
|
# * connect function in Microsoft's Winsock functions reference
|
909
1038
|
#
|
910
|
-
#
|
911
1039
|
def connect: (String | Addrinfo remote_sockaddr) -> Integer
|
912
1040
|
|
1041
|
+
# <!--
|
1042
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
1043
|
+
# - socket.connect_nonblock(remote_sockaddr, [options]) => 0
|
1044
|
+
# -->
|
913
1045
|
# Requests a connection to be made on the given `remote_sockaddr` after
|
914
1046
|
# O_NONBLOCK is set for the underlying file descriptor. Returns 0 if successful,
|
915
1047
|
# otherwise an exception is raised.
|
@@ -954,10 +1086,18 @@ class Socket < BasicSocket
|
|
954
1086
|
#
|
955
1087
|
def connect_nonblock: (untyped addr, ?exception: untyped) -> (Integer | :wait_writable)
|
956
1088
|
|
1089
|
+
# <!--
|
1090
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
1091
|
+
# - ipv6only!()
|
1092
|
+
# -->
|
957
1093
|
# enable the socket option IPV6_V6ONLY if IPV6_V6ONLY is available.
|
958
1094
|
#
|
959
1095
|
def ipv6only!: () -> void
|
960
1096
|
|
1097
|
+
# <!--
|
1098
|
+
# rdoc-file=ext/socket/socket.c
|
1099
|
+
# - socket.listen( int ) => 0
|
1100
|
+
# -->
|
961
1101
|
# Listens for connections, using the specified `int` as the backlog. A call to
|
962
1102
|
# *listen* only applies if the `socket` is of type SOCK_STREAM or
|
963
1103
|
# SOCK_SEQPACKET.
|
@@ -1027,9 +1167,13 @@ class Socket < BasicSocket
|
|
1027
1167
|
# * listen manual pages on unix-based systems
|
1028
1168
|
# * listen function in Microsoft's Winsock functions reference
|
1029
1169
|
#
|
1030
|
-
#
|
1031
1170
|
def listen: (Integer backlog_len) -> void
|
1032
1171
|
|
1172
|
+
# <!--
|
1173
|
+
# rdoc-file=ext/socket/socket.c
|
1174
|
+
# - socket.recvfrom(maxlen) => [mesg, sender_addrinfo]
|
1175
|
+
# - socket.recvfrom(maxlen, flags) => [mesg, sender_addrinfo]
|
1176
|
+
# -->
|
1033
1177
|
# Receives up to *maxlen* bytes from `socket`. *flags* is zero or more of the
|
1034
1178
|
# `MSG_` options. The first element of the results, *mesg*, is the data
|
1035
1179
|
# received. The second element, *sender_addrinfo*, contains protocol-specific
|
@@ -1134,10 +1278,12 @@ class Socket < BasicSocket
|
|
1134
1278
|
# indicates a previous send operation resulted in an ICMP Port Unreachable
|
1135
1279
|
# message.
|
1136
1280
|
#
|
1137
|
-
|
1138
|
-
#
|
1139
|
-
def recvfrom: (Integer maxlen, ?Integer flags) -> [String, Addrinfo]
|
1281
|
+
def recvfrom: (Integer maxlen, ?Integer flags) -> [ String, Addrinfo ]
|
1140
1282
|
|
1283
|
+
# <!--
|
1284
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
1285
|
+
# - socket.recvfrom_nonblock(maxlen[, flags[, outbuf[, opts]]]) => [mesg, sender_addrinfo]
|
1286
|
+
# -->
|
1141
1287
|
# Receives up to *maxlen* bytes from `socket` using recvfrom(2) after O_NONBLOCK
|
1142
1288
|
# is set for the underlying file descriptor. *flags* is zero or more of the
|
1143
1289
|
# `MSG_` options. The first element of the results, *mesg*, is the data
|
@@ -1201,9 +1347,12 @@ class Socket < BasicSocket
|
|
1201
1347
|
# ### See
|
1202
1348
|
# * Socket#recvfrom
|
1203
1349
|
#
|
1204
|
-
|
1205
|
-
def recvfrom_nonblock: (Integer maxlen, ?Integer flags, ?untyped outbuf, ?exception: boolish) -> ([String, Addrinfo] | :wait_readable)
|
1350
|
+
def recvfrom_nonblock: (Integer maxlen, ?Integer flags, ?untyped outbuf, ?exception: boolish) -> ([ String, Addrinfo ] | :wait_readable)
|
1206
1351
|
|
1352
|
+
# <!--
|
1353
|
+
# rdoc-file=ext/socket/socket.c
|
1354
|
+
# - socket.sysaccept => [client_socket_fd, client_addrinfo]
|
1355
|
+
# -->
|
1207
1356
|
# Accepts an incoming connection returning an array containing the (integer)
|
1208
1357
|
# file descriptor for the incoming connection, *client_socket_fd*, and an
|
1209
1358
|
# Addrinfo, *client_addrinfo*.
|
@@ -1238,8 +1387,7 @@ class Socket < BasicSocket
|
|
1238
1387
|
# ### See
|
1239
1388
|
# * Socket#accept
|
1240
1389
|
#
|
1241
|
-
|
1242
|
-
def sysaccept: () -> [Integer, Addrinfo]
|
1390
|
+
def sysaccept: () -> [ Integer, Addrinfo ]
|
1243
1391
|
|
1244
1392
|
private
|
1245
1393
|
|
@@ -1249,6 +1397,10 @@ class Socket < BasicSocket
|
|
1249
1397
|
|
1250
1398
|
def __recvfrom_nonblock: (untyped, untyped, untyped, untyped) -> untyped
|
1251
1399
|
|
1400
|
+
# <!--
|
1401
|
+
# rdoc-file=ext/socket/socket.c
|
1402
|
+
# - Socket.new(domain, socktype [, protocol]) => socket
|
1403
|
+
# -->
|
1252
1404
|
# Creates a new socket object.
|
1253
1405
|
#
|
1254
1406
|
# *domain* should be a communications domain such as: :INET, :INET6, :UNIX, etc.
|
@@ -1266,1174 +1418,1496 @@ class Socket < BasicSocket
|
|
1266
1418
|
def initialize: (Symbol domain, Symbol socktype, ?Integer protocol) -> untyped
|
1267
1419
|
end
|
1268
1420
|
|
1421
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1269
1422
|
# AppleTalk protocol
|
1270
1423
|
#
|
1271
1424
|
Socket::AF_APPLETALK: Integer
|
1272
1425
|
|
1426
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1273
1427
|
# CCITT (now ITU-T) protocols
|
1274
1428
|
#
|
1275
1429
|
Socket::AF_CCITT: Integer
|
1276
1430
|
|
1431
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1277
1432
|
# MIT CHAOS protocols
|
1278
1433
|
#
|
1279
1434
|
Socket::AF_CHAOS: Integer
|
1280
1435
|
|
1436
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1281
1437
|
# Computer Network Technology
|
1282
1438
|
#
|
1283
1439
|
Socket::AF_CNT: Integer
|
1284
1440
|
|
1441
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1285
1442
|
# Connection-oriented IP
|
1286
1443
|
#
|
1287
1444
|
Socket::AF_COIP: Integer
|
1288
1445
|
|
1446
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1289
1447
|
# Datakit protocol
|
1290
1448
|
#
|
1291
1449
|
Socket::AF_DATAKIT: Integer
|
1292
1450
|
|
1451
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1293
1452
|
# DEC Direct Data Link Interface protocol
|
1294
1453
|
#
|
1295
1454
|
Socket::AF_DLI: Integer
|
1296
1455
|
|
1456
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1297
1457
|
# CCITT (ITU-T) E.164 recommendation
|
1298
1458
|
#
|
1299
1459
|
Socket::AF_E164: Integer
|
1300
1460
|
|
1461
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1301
1462
|
# European Computer Manufacturers protocols
|
1302
1463
|
#
|
1303
1464
|
Socket::AF_ECMA: Integer
|
1304
1465
|
|
1466
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1305
1467
|
# NSC Hyperchannel protocol
|
1306
1468
|
#
|
1307
1469
|
Socket::AF_HYLINK: Integer
|
1308
1470
|
|
1471
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1309
1472
|
# ARPANET IMP protocol
|
1310
1473
|
#
|
1311
1474
|
Socket::AF_IMPLINK: Integer
|
1312
1475
|
|
1476
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1313
1477
|
# IPv4 protocol
|
1314
1478
|
#
|
1315
1479
|
Socket::AF_INET: Integer
|
1316
1480
|
|
1481
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1317
1482
|
# IPv6 protocol
|
1318
1483
|
#
|
1319
1484
|
Socket::AF_INET6: Integer
|
1320
1485
|
|
1486
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1321
1487
|
# IPX protocol
|
1322
1488
|
#
|
1323
1489
|
Socket::AF_IPX: Integer
|
1324
1490
|
|
1491
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1325
1492
|
# Integrated Services Digital Network
|
1326
1493
|
#
|
1327
1494
|
Socket::AF_ISDN: Integer
|
1328
1495
|
|
1496
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1329
1497
|
# ISO Open Systems Interconnection protocols
|
1330
1498
|
#
|
1331
1499
|
Socket::AF_ISO: Integer
|
1332
1500
|
|
1501
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1333
1502
|
# Local Area Transport protocol
|
1334
1503
|
#
|
1335
1504
|
Socket::AF_LAT: Integer
|
1336
1505
|
|
1506
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1337
1507
|
# Link layer interface
|
1338
1508
|
#
|
1339
1509
|
Socket::AF_LINK: Integer
|
1340
1510
|
|
1511
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1341
1512
|
# Host-internal protocols
|
1342
1513
|
#
|
1343
1514
|
Socket::AF_LOCAL: Integer
|
1344
1515
|
|
1516
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1345
1517
|
# Maximum address family for this platform
|
1346
1518
|
#
|
1347
1519
|
Socket::AF_MAX: Integer
|
1348
1520
|
|
1521
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1349
1522
|
# Native ATM access
|
1350
1523
|
#
|
1351
1524
|
Socket::AF_NATM: Integer
|
1352
1525
|
|
1526
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1353
1527
|
# Network driver raw access
|
1354
1528
|
#
|
1355
1529
|
Socket::AF_NDRV: Integer
|
1356
1530
|
|
1531
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1357
1532
|
# NetBIOS
|
1358
1533
|
#
|
1359
1534
|
Socket::AF_NETBIOS: Integer
|
1360
1535
|
|
1536
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1361
1537
|
# XEROX NS protocols
|
1362
1538
|
#
|
1363
1539
|
Socket::AF_NS: Integer
|
1364
1540
|
|
1541
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1365
1542
|
# ISO Open Systems Interconnection protocols
|
1366
1543
|
#
|
1367
1544
|
Socket::AF_OSI: Integer
|
1368
1545
|
|
1546
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1369
1547
|
# Point-to-Point Protocol
|
1370
1548
|
#
|
1371
1549
|
Socket::AF_PPP: Integer
|
1372
1550
|
|
1551
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1373
1552
|
# PARC Universal Packet protocol
|
1374
1553
|
#
|
1375
1554
|
Socket::AF_PUP: Integer
|
1376
1555
|
|
1556
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1377
1557
|
# Internal routing protocol
|
1378
1558
|
#
|
1379
1559
|
Socket::AF_ROUTE: Integer
|
1380
1560
|
|
1561
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1381
1562
|
# Simple Internet Protocol
|
1382
1563
|
#
|
1383
1564
|
Socket::AF_SIP: Integer
|
1384
1565
|
|
1566
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1385
1567
|
# IBM SNA protocol
|
1386
1568
|
#
|
1387
1569
|
Socket::AF_SNA: Integer
|
1388
1570
|
|
1389
1571
|
Socket::AF_SYSTEM: Integer
|
1390
1572
|
|
1573
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1391
1574
|
# UNIX sockets
|
1392
1575
|
#
|
1393
1576
|
Socket::AF_UNIX: Integer
|
1394
1577
|
|
1578
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1395
1579
|
# Unspecified protocol, any supported address family
|
1396
1580
|
#
|
1397
1581
|
Socket::AF_UNSPEC: Integer
|
1398
1582
|
|
1583
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1399
1584
|
# Accept only if any address is assigned
|
1400
1585
|
#
|
1401
1586
|
Socket::AI_ADDRCONFIG: Integer
|
1402
1587
|
|
1588
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1403
1589
|
# Allow all addresses
|
1404
1590
|
#
|
1405
1591
|
Socket::AI_ALL: Integer
|
1406
1592
|
|
1593
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1407
1594
|
# Fill in the canonical name
|
1408
1595
|
#
|
1409
1596
|
Socket::AI_CANONNAME: Integer
|
1410
1597
|
|
1598
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1411
1599
|
# Default flags for getaddrinfo
|
1412
1600
|
#
|
1413
1601
|
Socket::AI_DEFAULT: Integer
|
1414
1602
|
|
1603
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1415
1604
|
# Valid flag mask for getaddrinfo (not for application use)
|
1416
1605
|
#
|
1417
1606
|
Socket::AI_MASK: Integer
|
1418
1607
|
|
1608
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1419
1609
|
# Prevent host name resolution
|
1420
1610
|
#
|
1421
1611
|
Socket::AI_NUMERICHOST: Integer
|
1422
1612
|
|
1613
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1423
1614
|
# Prevent service name resolution
|
1424
1615
|
#
|
1425
1616
|
Socket::AI_NUMERICSERV: Integer
|
1426
1617
|
|
1618
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1427
1619
|
# Get address to use with bind()
|
1428
1620
|
#
|
1429
1621
|
Socket::AI_PASSIVE: Integer
|
1430
1622
|
|
1623
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1431
1624
|
# Accept IPv4-mapped IPv6 addresses
|
1432
1625
|
#
|
1433
1626
|
Socket::AI_V4MAPPED: Integer
|
1434
1627
|
|
1628
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1435
1629
|
# Accept IPv4 mapped addresses if the kernel supports it
|
1436
1630
|
#
|
1437
1631
|
Socket::AI_V4MAPPED_CFG: Integer
|
1438
1632
|
|
1633
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1439
1634
|
# Address family for hostname not supported
|
1440
1635
|
#
|
1441
1636
|
Socket::EAI_ADDRFAMILY: Integer
|
1442
1637
|
|
1638
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1443
1639
|
# Temporary failure in name resolution
|
1444
1640
|
#
|
1445
1641
|
Socket::EAI_AGAIN: Integer
|
1446
1642
|
|
1643
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1447
1644
|
# Invalid flags
|
1448
1645
|
#
|
1449
1646
|
Socket::EAI_BADFLAGS: Integer
|
1450
1647
|
|
1648
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1451
1649
|
# Invalid value for hints
|
1452
1650
|
#
|
1453
1651
|
Socket::EAI_BADHINTS: Integer
|
1454
1652
|
|
1653
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1455
1654
|
# Non-recoverable failure in name resolution
|
1456
1655
|
#
|
1457
1656
|
Socket::EAI_FAIL: Integer
|
1458
1657
|
|
1658
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1459
1659
|
# Address family not supported
|
1460
1660
|
#
|
1461
1661
|
Socket::EAI_FAMILY: Integer
|
1462
1662
|
|
1663
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1463
1664
|
# Maximum error code from getaddrinfo
|
1464
1665
|
#
|
1465
1666
|
Socket::EAI_MAX: Integer
|
1466
1667
|
|
1668
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1467
1669
|
# Memory allocation failure
|
1468
1670
|
#
|
1469
1671
|
Socket::EAI_MEMORY: Integer
|
1470
1672
|
|
1673
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1471
1674
|
# No address associated with hostname
|
1472
1675
|
#
|
1473
1676
|
Socket::EAI_NODATA: Integer
|
1474
1677
|
|
1678
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1475
1679
|
# Hostname nor servname, or not known
|
1476
1680
|
#
|
1477
1681
|
Socket::EAI_NONAME: Integer
|
1478
1682
|
|
1683
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1479
1684
|
# Argument buffer overflow
|
1480
1685
|
#
|
1481
1686
|
Socket::EAI_OVERFLOW: Integer
|
1482
1687
|
|
1688
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1483
1689
|
# Resolved protocol is unknown
|
1484
1690
|
#
|
1485
1691
|
Socket::EAI_PROTOCOL: Integer
|
1486
1692
|
|
1693
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1487
1694
|
# Servname not supported for socket type
|
1488
1695
|
#
|
1489
1696
|
Socket::EAI_SERVICE: Integer
|
1490
1697
|
|
1698
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1491
1699
|
# Socket type not supported
|
1492
1700
|
#
|
1493
1701
|
Socket::EAI_SOCKTYPE: Integer
|
1494
1702
|
|
1703
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1495
1704
|
# System error returned in errno
|
1496
1705
|
#
|
1497
1706
|
Socket::EAI_SYSTEM: Integer
|
1498
1707
|
|
1708
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1499
1709
|
# receive all multicast packets
|
1500
1710
|
#
|
1501
1711
|
Socket::IFF_ALLMULTI: Integer
|
1502
1712
|
|
1713
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1503
1714
|
# use alternate physical connection
|
1504
1715
|
#
|
1505
1716
|
Socket::IFF_ALTPHYS: Integer
|
1506
1717
|
|
1718
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1507
1719
|
# broadcast address valid
|
1508
1720
|
#
|
1509
1721
|
Socket::IFF_BROADCAST: Integer
|
1510
1722
|
|
1723
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1511
1724
|
# turn on debugging
|
1512
1725
|
#
|
1513
1726
|
Socket::IFF_DEBUG: Integer
|
1514
1727
|
|
1728
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1515
1729
|
# per link layer defined bit 0
|
1516
1730
|
#
|
1517
1731
|
Socket::IFF_LINK0: Integer
|
1518
1732
|
|
1733
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1519
1734
|
# per link layer defined bit 1
|
1520
1735
|
#
|
1521
1736
|
Socket::IFF_LINK1: Integer
|
1522
1737
|
|
1738
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1523
1739
|
# per link layer defined bit 2
|
1524
1740
|
#
|
1525
1741
|
Socket::IFF_LINK2: Integer
|
1526
1742
|
|
1743
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1527
1744
|
# loopback net
|
1528
1745
|
#
|
1529
1746
|
Socket::IFF_LOOPBACK: Integer
|
1530
1747
|
|
1748
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1531
1749
|
# supports multicast
|
1532
1750
|
#
|
1533
1751
|
Socket::IFF_MULTICAST: Integer
|
1534
1752
|
|
1753
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1535
1754
|
# no address resolution protocol
|
1536
1755
|
#
|
1537
1756
|
Socket::IFF_NOARP: Integer
|
1538
1757
|
|
1758
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1539
1759
|
# avoid use of trailers
|
1540
1760
|
#
|
1541
1761
|
Socket::IFF_NOTRAILERS: Integer
|
1542
1762
|
|
1763
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1543
1764
|
# transmission in progress
|
1544
1765
|
#
|
1545
1766
|
Socket::IFF_OACTIVE: Integer
|
1546
1767
|
|
1768
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1547
1769
|
# point-to-point link
|
1548
1770
|
#
|
1549
1771
|
Socket::IFF_POINTOPOINT: Integer
|
1550
1772
|
|
1773
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1551
1774
|
# receive all packets
|
1552
1775
|
#
|
1553
1776
|
Socket::IFF_PROMISC: Integer
|
1554
1777
|
|
1778
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1555
1779
|
# resources allocated
|
1556
1780
|
#
|
1557
1781
|
Socket::IFF_RUNNING: Integer
|
1558
1782
|
|
1783
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1559
1784
|
# can't hear own transmissions
|
1560
1785
|
#
|
1561
1786
|
Socket::IFF_SIMPLEX: Integer
|
1562
1787
|
|
1788
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1563
1789
|
# interface is up
|
1564
1790
|
#
|
1565
1791
|
Socket::IFF_UP: Integer
|
1566
1792
|
|
1793
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1567
1794
|
# Maximum interface name size
|
1568
1795
|
#
|
1569
1796
|
Socket::IFNAMSIZ: Integer
|
1570
1797
|
|
1798
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1571
1799
|
# Maximum interface name size
|
1572
1800
|
#
|
1573
1801
|
Socket::IF_NAMESIZE: Integer
|
1574
1802
|
|
1803
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1575
1804
|
# Multicast group for all systems on this subset
|
1576
1805
|
#
|
1577
1806
|
Socket::INADDR_ALLHOSTS_GROUP: Integer
|
1578
1807
|
|
1808
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1579
1809
|
# A socket bound to INADDR_ANY receives packets from all interfaces and sends
|
1580
1810
|
# from the default IP address
|
1581
1811
|
#
|
1582
1812
|
Socket::INADDR_ANY: Integer
|
1583
1813
|
|
1814
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1584
1815
|
# The network broadcast address
|
1585
1816
|
#
|
1586
1817
|
Socket::INADDR_BROADCAST: Integer
|
1587
1818
|
|
1819
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1588
1820
|
# The loopback address
|
1589
1821
|
#
|
1590
1822
|
Socket::INADDR_LOOPBACK: Integer
|
1591
1823
|
|
1824
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1592
1825
|
# The last local network multicast group
|
1593
1826
|
#
|
1594
1827
|
Socket::INADDR_MAX_LOCAL_GROUP: Integer
|
1595
1828
|
|
1829
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1596
1830
|
# A bitmask for matching no valid IP address
|
1597
1831
|
#
|
1598
1832
|
Socket::INADDR_NONE: Integer
|
1599
1833
|
|
1834
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1600
1835
|
# The reserved multicast group
|
1601
1836
|
#
|
1602
1837
|
Socket::INADDR_UNSPEC_GROUP: Integer
|
1603
1838
|
|
1839
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1604
1840
|
# Maximum length of an IPv6 address string
|
1605
1841
|
#
|
1606
1842
|
Socket::INET6_ADDRSTRLEN: Integer
|
1607
1843
|
|
1844
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1608
1845
|
# Maximum length of an IPv4 address string
|
1609
1846
|
#
|
1610
1847
|
Socket::INET_ADDRSTRLEN: Integer
|
1611
1848
|
|
1849
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1612
1850
|
# Default minimum address for bind or connect
|
1613
1851
|
#
|
1614
1852
|
Socket::IPPORT_RESERVED: Integer
|
1615
1853
|
|
1854
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1616
1855
|
# Default maximum address for bind or connect
|
1617
1856
|
#
|
1618
1857
|
Socket::IPPORT_USERRESERVED: Integer
|
1619
1858
|
|
1859
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1620
1860
|
# IP6 auth header
|
1621
1861
|
#
|
1622
1862
|
Socket::IPPROTO_AH: Integer
|
1623
1863
|
|
1864
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1624
1865
|
# IP6 destination option
|
1625
1866
|
#
|
1626
1867
|
Socket::IPPROTO_DSTOPTS: Integer
|
1627
1868
|
|
1869
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1628
1870
|
# Exterior Gateway Protocol
|
1629
1871
|
#
|
1630
1872
|
Socket::IPPROTO_EGP: Integer
|
1631
1873
|
|
1874
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1632
1875
|
# ISO cnlp
|
1633
1876
|
#
|
1634
1877
|
Socket::IPPROTO_EON: Integer
|
1635
1878
|
|
1879
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1636
1880
|
# IP6 Encapsulated Security Payload
|
1637
1881
|
#
|
1638
1882
|
Socket::IPPROTO_ESP: Integer
|
1639
1883
|
|
1884
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1640
1885
|
# IP6 fragmentation header
|
1641
1886
|
#
|
1642
1887
|
Socket::IPPROTO_FRAGMENT: Integer
|
1643
1888
|
|
1889
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1644
1890
|
# Gateway to Gateway Protocol
|
1645
1891
|
#
|
1646
1892
|
Socket::IPPROTO_GGP: Integer
|
1647
1893
|
|
1894
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1648
1895
|
# "hello" routing protocol
|
1649
1896
|
#
|
1650
1897
|
Socket::IPPROTO_HELLO: Integer
|
1651
1898
|
|
1899
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1652
1900
|
# IP6 hop-by-hop options
|
1653
1901
|
#
|
1654
1902
|
Socket::IPPROTO_HOPOPTS: Integer
|
1655
1903
|
|
1904
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1656
1905
|
# Control message protocol
|
1657
1906
|
#
|
1658
1907
|
Socket::IPPROTO_ICMP: Integer
|
1659
1908
|
|
1909
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1660
1910
|
# ICMP6
|
1661
1911
|
#
|
1662
1912
|
Socket::IPPROTO_ICMPV6: Integer
|
1663
1913
|
|
1914
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1664
1915
|
# XNS IDP
|
1665
1916
|
#
|
1666
1917
|
Socket::IPPROTO_IDP: Integer
|
1667
1918
|
|
1919
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1668
1920
|
# Group Management Protocol
|
1669
1921
|
#
|
1670
1922
|
Socket::IPPROTO_IGMP: Integer
|
1671
1923
|
|
1924
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1672
1925
|
# Dummy protocol for IP
|
1673
1926
|
#
|
1674
1927
|
Socket::IPPROTO_IP: Integer
|
1675
1928
|
|
1929
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1676
1930
|
# IP6 header
|
1677
1931
|
#
|
1678
1932
|
Socket::IPPROTO_IPV6: Integer
|
1679
1933
|
|
1934
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1680
1935
|
# Maximum IPPROTO constant
|
1681
1936
|
#
|
1682
1937
|
Socket::IPPROTO_MAX: Integer
|
1683
1938
|
|
1939
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1684
1940
|
# Sun net disk protocol
|
1685
1941
|
#
|
1686
1942
|
Socket::IPPROTO_ND: Integer
|
1687
1943
|
|
1944
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1688
1945
|
# IP6 no next header
|
1689
1946
|
#
|
1690
1947
|
Socket::IPPROTO_NONE: Integer
|
1691
1948
|
|
1949
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1692
1950
|
# PARC Universal Packet protocol
|
1693
1951
|
#
|
1694
1952
|
Socket::IPPROTO_PUP: Integer
|
1695
1953
|
|
1954
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1696
1955
|
# Raw IP packet
|
1697
1956
|
#
|
1698
1957
|
Socket::IPPROTO_RAW: Integer
|
1699
1958
|
|
1959
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1700
1960
|
# IP6 routing header
|
1701
1961
|
#
|
1702
1962
|
Socket::IPPROTO_ROUTING: Integer
|
1703
1963
|
|
1964
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1704
1965
|
# TCP
|
1705
1966
|
#
|
1706
1967
|
Socket::IPPROTO_TCP: Integer
|
1707
1968
|
|
1969
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1708
1970
|
# ISO transport protocol class 4
|
1709
1971
|
#
|
1710
1972
|
Socket::IPPROTO_TP: Integer
|
1711
1973
|
|
1974
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1712
1975
|
# UDP
|
1713
1976
|
#
|
1714
1977
|
Socket::IPPROTO_UDP: Integer
|
1715
1978
|
|
1979
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1716
1980
|
# Xpress Transport Protocol
|
1717
1981
|
#
|
1718
1982
|
Socket::IPPROTO_XTP: Integer
|
1719
1983
|
|
1984
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1720
1985
|
# Checksum offset for raw sockets
|
1721
1986
|
#
|
1722
1987
|
Socket::IPV6_CHECKSUM: Integer
|
1723
1988
|
|
1989
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1724
1990
|
# Don't fragment packets
|
1725
1991
|
#
|
1726
1992
|
Socket::IPV6_DONTFRAG: Integer
|
1727
1993
|
|
1994
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1728
1995
|
# Destination option
|
1729
1996
|
#
|
1730
1997
|
Socket::IPV6_DSTOPTS: Integer
|
1731
1998
|
|
1999
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1732
2000
|
# Hop limit
|
1733
2001
|
#
|
1734
2002
|
Socket::IPV6_HOPLIMIT: Integer
|
1735
2003
|
|
2004
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1736
2005
|
# Hop-by-hop option
|
1737
2006
|
#
|
1738
2007
|
Socket::IPV6_HOPOPTS: Integer
|
1739
2008
|
|
2009
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1740
2010
|
# Join a group membership
|
1741
2011
|
#
|
1742
2012
|
Socket::IPV6_JOIN_GROUP: Integer
|
1743
2013
|
|
2014
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1744
2015
|
# Leave a group membership
|
1745
2016
|
#
|
1746
2017
|
Socket::IPV6_LEAVE_GROUP: Integer
|
1747
2018
|
|
2019
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1748
2020
|
# IP6 multicast hops
|
1749
2021
|
#
|
1750
2022
|
Socket::IPV6_MULTICAST_HOPS: Integer
|
1751
2023
|
|
2024
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1752
2025
|
# IP6 multicast interface
|
1753
2026
|
#
|
1754
2027
|
Socket::IPV6_MULTICAST_IF: Integer
|
1755
2028
|
|
2029
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1756
2030
|
# IP6 multicast loopback
|
1757
2031
|
#
|
1758
2032
|
Socket::IPV6_MULTICAST_LOOP: Integer
|
1759
2033
|
|
2034
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1760
2035
|
# Next hop address
|
1761
2036
|
#
|
1762
2037
|
Socket::IPV6_NEXTHOP: Integer
|
1763
2038
|
|
2039
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1764
2040
|
# Retrieve current path MTU
|
1765
2041
|
#
|
1766
2042
|
Socket::IPV6_PATHMTU: Integer
|
1767
2043
|
|
2044
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1768
2045
|
# Receive packet information with datagram
|
1769
2046
|
#
|
1770
2047
|
Socket::IPV6_PKTINFO: Integer
|
1771
2048
|
|
2049
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1772
2050
|
# Receive all IP6 options for response
|
1773
2051
|
#
|
1774
2052
|
Socket::IPV6_RECVDSTOPTS: Integer
|
1775
2053
|
|
2054
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1776
2055
|
# Receive hop limit with datagram
|
1777
2056
|
#
|
1778
2057
|
Socket::IPV6_RECVHOPLIMIT: Integer
|
1779
2058
|
|
2059
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1780
2060
|
# Receive hop-by-hop options
|
1781
2061
|
#
|
1782
2062
|
Socket::IPV6_RECVHOPOPTS: Integer
|
1783
2063
|
|
2064
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1784
2065
|
# Receive current path MTU with datagram
|
1785
2066
|
#
|
1786
2067
|
Socket::IPV6_RECVPATHMTU: Integer
|
1787
2068
|
|
2069
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1788
2070
|
# Receive destination IP address and incoming interface
|
1789
2071
|
#
|
1790
2072
|
Socket::IPV6_RECVPKTINFO: Integer
|
1791
2073
|
|
2074
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1792
2075
|
# Receive routing header
|
1793
2076
|
#
|
1794
2077
|
Socket::IPV6_RECVRTHDR: Integer
|
1795
2078
|
|
2079
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1796
2080
|
# Receive traffic class
|
1797
2081
|
#
|
1798
2082
|
Socket::IPV6_RECVTCLASS: Integer
|
1799
2083
|
|
2084
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1800
2085
|
# Allows removal of sticky routing headers
|
1801
2086
|
#
|
1802
2087
|
Socket::IPV6_RTHDR: Integer
|
1803
2088
|
|
2089
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1804
2090
|
# Allows removal of sticky destination options header
|
1805
2091
|
#
|
1806
2092
|
Socket::IPV6_RTHDRDSTOPTS: Integer
|
1807
2093
|
|
2094
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1808
2095
|
# Routing header type 0
|
1809
2096
|
#
|
1810
2097
|
Socket::IPV6_RTHDR_TYPE_0: Integer
|
1811
2098
|
|
2099
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1812
2100
|
# Specify the traffic class
|
1813
2101
|
#
|
1814
2102
|
Socket::IPV6_TCLASS: Integer
|
1815
2103
|
|
2104
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1816
2105
|
# IP6 unicast hops
|
1817
2106
|
#
|
1818
2107
|
Socket::IPV6_UNICAST_HOPS: Integer
|
1819
2108
|
|
2109
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1820
2110
|
# Use the minimum MTU size
|
1821
2111
|
#
|
1822
2112
|
Socket::IPV6_USE_MIN_MTU: Integer
|
1823
2113
|
|
2114
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1824
2115
|
# Only bind IPv6 with a wildcard bind
|
1825
2116
|
#
|
1826
2117
|
Socket::IPV6_V6ONLY: Integer
|
1827
2118
|
|
2119
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1828
2120
|
# Add a multicast group membership
|
1829
2121
|
#
|
1830
2122
|
Socket::IP_ADD_MEMBERSHIP: Integer
|
1831
2123
|
|
2124
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1832
2125
|
# Add a multicast group membership
|
1833
2126
|
#
|
1834
2127
|
Socket::IP_ADD_SOURCE_MEMBERSHIP: Integer
|
1835
2128
|
|
2129
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1836
2130
|
# Block IPv4 multicast packets with a give source address
|
1837
2131
|
#
|
1838
2132
|
Socket::IP_BLOCK_SOURCE: Integer
|
1839
2133
|
|
2134
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1840
2135
|
# Default multicast loopback
|
1841
2136
|
#
|
1842
2137
|
Socket::IP_DEFAULT_MULTICAST_LOOP: Integer
|
1843
2138
|
|
2139
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1844
2140
|
# Default multicast TTL
|
1845
2141
|
#
|
1846
2142
|
Socket::IP_DEFAULT_MULTICAST_TTL: Integer
|
1847
2143
|
|
2144
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1848
2145
|
# Drop a multicast group membership
|
1849
2146
|
#
|
1850
2147
|
Socket::IP_DROP_MEMBERSHIP: Integer
|
1851
2148
|
|
2149
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1852
2150
|
# Drop a multicast group membership
|
1853
2151
|
#
|
1854
2152
|
Socket::IP_DROP_SOURCE_MEMBERSHIP: Integer
|
1855
2153
|
|
2154
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1856
2155
|
# Header is included with data
|
1857
2156
|
#
|
1858
2157
|
Socket::IP_HDRINCL: Integer
|
1859
2158
|
|
2159
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1860
2160
|
# IPsec security policy
|
1861
2161
|
#
|
1862
2162
|
Socket::IP_IPSEC_POLICY: Integer
|
1863
2163
|
|
2164
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1864
2165
|
# Maximum number multicast groups a socket can join
|
1865
2166
|
#
|
1866
2167
|
Socket::IP_MAX_MEMBERSHIPS: Integer
|
1867
2168
|
|
2169
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1868
2170
|
# Multicast source filtering
|
1869
2171
|
#
|
1870
2172
|
Socket::IP_MSFILTER: Integer
|
1871
2173
|
|
2174
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1872
2175
|
# IP multicast interface
|
1873
2176
|
#
|
1874
2177
|
Socket::IP_MULTICAST_IF: Integer
|
1875
2178
|
|
2179
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1876
2180
|
# IP multicast loopback
|
1877
2181
|
#
|
1878
2182
|
Socket::IP_MULTICAST_LOOP: Integer
|
1879
2183
|
|
2184
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1880
2185
|
# IP multicast TTL
|
1881
2186
|
#
|
1882
2187
|
Socket::IP_MULTICAST_TTL: Integer
|
1883
2188
|
|
2189
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1884
2190
|
# IP options to be included in packets
|
1885
2191
|
#
|
1886
2192
|
Socket::IP_OPTIONS: Integer
|
1887
2193
|
|
2194
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1888
2195
|
# Receive packet information with datagrams
|
1889
2196
|
#
|
1890
2197
|
Socket::IP_PKTINFO: Integer
|
1891
2198
|
|
2199
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1892
2200
|
# Set the port range for sockets with unspecified port numbers
|
1893
2201
|
#
|
1894
2202
|
Socket::IP_PORTRANGE: Integer
|
1895
2203
|
|
2204
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1896
2205
|
# Receive IP destination address with datagram
|
1897
2206
|
#
|
1898
2207
|
Socket::IP_RECVDSTADDR: Integer
|
1899
2208
|
|
2209
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1900
2210
|
# Receive interface information with datagrams
|
1901
2211
|
#
|
1902
2212
|
Socket::IP_RECVIF: Integer
|
1903
2213
|
|
2214
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1904
2215
|
# Receive all IP options with datagram
|
1905
2216
|
#
|
1906
2217
|
Socket::IP_RECVOPTS: Integer
|
1907
2218
|
|
2219
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1908
2220
|
# Receive all IP options for response
|
1909
2221
|
#
|
1910
2222
|
Socket::IP_RECVRETOPTS: Integer
|
1911
2223
|
|
2224
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1912
2225
|
# Receive TOS with incoming packets
|
1913
2226
|
#
|
1914
2227
|
Socket::IP_RECVTOS: Integer
|
1915
2228
|
|
2229
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1916
2230
|
# Receive IP TTL with datagrams
|
1917
2231
|
#
|
1918
2232
|
Socket::IP_RECVTTL: Integer
|
1919
2233
|
|
2234
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1920
2235
|
# IP options to be included in datagrams
|
1921
2236
|
#
|
1922
2237
|
Socket::IP_RETOPTS: Integer
|
1923
2238
|
|
2239
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1924
2240
|
# IP type-of-service
|
1925
2241
|
#
|
1926
2242
|
Socket::IP_TOS: Integer
|
1927
2243
|
|
2244
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1928
2245
|
# IP time-to-live
|
1929
2246
|
#
|
1930
2247
|
Socket::IP_TTL: Integer
|
1931
2248
|
|
2249
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1932
2250
|
# Unblock IPv4 multicast packets with a give source address
|
1933
2251
|
#
|
1934
2252
|
Socket::IP_UNBLOCK_SOURCE: Integer
|
1935
2253
|
|
2254
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1936
2255
|
# Retrieve peer credentials
|
1937
2256
|
#
|
1938
2257
|
Socket::LOCAL_PEERCRED: Integer
|
1939
2258
|
|
2259
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1940
2260
|
# Block multicast packets from this source
|
1941
2261
|
#
|
1942
2262
|
Socket::MCAST_BLOCK_SOURCE: Integer
|
1943
2263
|
|
2264
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1944
2265
|
# Exclusive multicast source filter
|
1945
2266
|
#
|
1946
2267
|
Socket::MCAST_EXCLUDE: Integer
|
1947
2268
|
|
2269
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1948
2270
|
# Inclusive multicast source filter
|
1949
2271
|
#
|
1950
2272
|
Socket::MCAST_INCLUDE: Integer
|
1951
2273
|
|
2274
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1952
2275
|
# Join a multicast group
|
1953
2276
|
#
|
1954
2277
|
Socket::MCAST_JOIN_GROUP: Integer
|
1955
2278
|
|
2279
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1956
2280
|
# Join a multicast source group
|
1957
2281
|
#
|
1958
2282
|
Socket::MCAST_JOIN_SOURCE_GROUP: Integer
|
1959
2283
|
|
2284
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1960
2285
|
# Leave a multicast group
|
1961
2286
|
#
|
1962
2287
|
Socket::MCAST_LEAVE_GROUP: Integer
|
1963
2288
|
|
2289
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1964
2290
|
# Leave a multicast source group
|
1965
2291
|
#
|
1966
2292
|
Socket::MCAST_LEAVE_SOURCE_GROUP: Integer
|
1967
2293
|
|
2294
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1968
2295
|
# Unblock multicast packets from this source
|
1969
2296
|
#
|
1970
2297
|
Socket::MCAST_UNBLOCK_SOURCE: Integer
|
1971
2298
|
|
2299
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1972
2300
|
# Control data lost before delivery
|
1973
2301
|
#
|
1974
2302
|
Socket::MSG_CTRUNC: Integer
|
1975
2303
|
|
2304
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1976
2305
|
# Send without using the routing tables
|
1977
2306
|
#
|
1978
2307
|
Socket::MSG_DONTROUTE: Integer
|
1979
2308
|
|
2309
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1980
2310
|
# This message should be non-blocking
|
1981
2311
|
#
|
1982
2312
|
Socket::MSG_DONTWAIT: Integer
|
1983
2313
|
|
2314
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1984
2315
|
# Data completes connection
|
1985
2316
|
#
|
1986
2317
|
Socket::MSG_EOF: Integer
|
1987
2318
|
|
2319
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1988
2320
|
# Data completes record
|
1989
2321
|
#
|
1990
2322
|
Socket::MSG_EOR: Integer
|
1991
2323
|
|
2324
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1992
2325
|
# Start of a hold sequence. Dumps to so_temp
|
1993
2326
|
#
|
1994
2327
|
Socket::MSG_FLUSH: Integer
|
1995
2328
|
|
2329
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
1996
2330
|
# Data ready to be read
|
1997
2331
|
#
|
1998
2332
|
Socket::MSG_HAVEMORE: Integer
|
1999
2333
|
|
2334
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2000
2335
|
# Hold fragment in so_temp
|
2001
2336
|
#
|
2002
2337
|
Socket::MSG_HOLD: Integer
|
2003
2338
|
|
2339
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2004
2340
|
# Process out-of-band data
|
2005
2341
|
#
|
2006
2342
|
Socket::MSG_OOB: Integer
|
2007
2343
|
|
2344
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2008
2345
|
# Peek at incoming message
|
2009
2346
|
#
|
2010
2347
|
Socket::MSG_PEEK: Integer
|
2011
2348
|
|
2349
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2012
2350
|
# Data remains in the current packet
|
2013
2351
|
#
|
2014
2352
|
Socket::MSG_RCVMORE: Integer
|
2015
2353
|
|
2354
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2016
2355
|
# Send the packet in so_temp
|
2017
2356
|
#
|
2018
2357
|
Socket::MSG_SEND: Integer
|
2019
2358
|
|
2359
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2020
2360
|
# Data discarded before delivery
|
2021
2361
|
#
|
2022
2362
|
Socket::MSG_TRUNC: Integer
|
2023
2363
|
|
2364
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2024
2365
|
# Wait for full request or error
|
2025
2366
|
#
|
2026
2367
|
Socket::MSG_WAITALL: Integer
|
2027
2368
|
|
2369
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2028
2370
|
# The service specified is a datagram service (looks up UDP ports)
|
2029
2371
|
#
|
2030
2372
|
Socket::NI_DGRAM: Integer
|
2031
2373
|
|
2374
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2032
2375
|
# Maximum length of a hostname
|
2033
2376
|
#
|
2034
2377
|
Socket::NI_MAXHOST: Integer
|
2035
2378
|
|
2379
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2036
2380
|
# Maximum length of a service name
|
2037
2381
|
#
|
2038
2382
|
Socket::NI_MAXSERV: Integer
|
2039
2383
|
|
2384
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2040
2385
|
# A name is required
|
2041
2386
|
#
|
2042
2387
|
Socket::NI_NAMEREQD: Integer
|
2043
2388
|
|
2389
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2044
2390
|
# An FQDN is not required for local hosts, return only the local part
|
2045
2391
|
#
|
2046
2392
|
Socket::NI_NOFQDN: Integer
|
2047
2393
|
|
2394
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2048
2395
|
# Return a numeric address
|
2049
2396
|
#
|
2050
2397
|
Socket::NI_NUMERICHOST: Integer
|
2051
2398
|
|
2399
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2052
2400
|
# Return the service name as a digit string
|
2053
2401
|
#
|
2054
2402
|
Socket::NI_NUMERICSERV: Integer
|
2055
2403
|
|
2404
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2056
2405
|
# AppleTalk protocol
|
2057
2406
|
#
|
2058
2407
|
Socket::PF_APPLETALK: Integer
|
2059
2408
|
|
2409
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2060
2410
|
# CCITT (now ITU-T) protocols
|
2061
2411
|
#
|
2062
2412
|
Socket::PF_CCITT: Integer
|
2063
2413
|
|
2414
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2064
2415
|
# MIT CHAOS protocols
|
2065
2416
|
#
|
2066
2417
|
Socket::PF_CHAOS: Integer
|
2067
2418
|
|
2419
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2068
2420
|
# Computer Network Technology
|
2069
2421
|
#
|
2070
2422
|
Socket::PF_CNT: Integer
|
2071
2423
|
|
2424
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2072
2425
|
# Connection-oriented IP
|
2073
2426
|
#
|
2074
2427
|
Socket::PF_COIP: Integer
|
2075
2428
|
|
2429
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2076
2430
|
# Datakit protocol
|
2077
2431
|
#
|
2078
2432
|
Socket::PF_DATAKIT: Integer
|
2079
2433
|
|
2434
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2080
2435
|
# DEC Direct Data Link Interface protocol
|
2081
2436
|
#
|
2082
2437
|
Socket::PF_DLI: Integer
|
2083
2438
|
|
2439
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2084
2440
|
# European Computer Manufacturers protocols
|
2085
2441
|
#
|
2086
2442
|
Socket::PF_ECMA: Integer
|
2087
2443
|
|
2444
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2088
2445
|
# NSC Hyperchannel protocol
|
2089
2446
|
#
|
2090
2447
|
Socket::PF_HYLINK: Integer
|
2091
2448
|
|
2449
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2092
2450
|
# ARPANET IMP protocol
|
2093
2451
|
#
|
2094
2452
|
Socket::PF_IMPLINK: Integer
|
2095
2453
|
|
2454
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2096
2455
|
# IPv4 protocol
|
2097
2456
|
#
|
2098
2457
|
Socket::PF_INET: Integer
|
2099
2458
|
|
2459
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2100
2460
|
# IPv6 protocol
|
2101
2461
|
#
|
2102
2462
|
Socket::PF_INET6: Integer
|
2103
2463
|
|
2464
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2104
2465
|
# IPX protocol
|
2105
2466
|
#
|
2106
2467
|
Socket::PF_IPX: Integer
|
2107
2468
|
|
2469
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2108
2470
|
# Integrated Services Digital Network
|
2109
2471
|
#
|
2110
2472
|
Socket::PF_ISDN: Integer
|
2111
2473
|
|
2474
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2112
2475
|
# ISO Open Systems Interconnection protocols
|
2113
2476
|
#
|
2114
2477
|
Socket::PF_ISO: Integer
|
2115
2478
|
|
2479
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2480
|
+
# Key management protocol, originally developed for usage with IPsec
|
2481
|
+
#
|
2116
2482
|
Socket::PF_KEY: Integer
|
2117
2483
|
|
2484
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2118
2485
|
# Local Area Transport protocol
|
2119
2486
|
#
|
2120
2487
|
Socket::PF_LAT: Integer
|
2121
2488
|
|
2489
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2122
2490
|
# Link layer interface
|
2123
2491
|
#
|
2124
2492
|
Socket::PF_LINK: Integer
|
2125
2493
|
|
2494
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2126
2495
|
# Host-internal protocols
|
2127
2496
|
#
|
2128
2497
|
Socket::PF_LOCAL: Integer
|
2129
2498
|
|
2499
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2130
2500
|
# Maximum address family for this platform
|
2131
2501
|
#
|
2132
2502
|
Socket::PF_MAX: Integer
|
2133
2503
|
|
2504
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2134
2505
|
# Native ATM access
|
2135
2506
|
#
|
2136
2507
|
Socket::PF_NATM: Integer
|
2137
2508
|
|
2509
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2138
2510
|
# Network driver raw access
|
2139
2511
|
#
|
2140
2512
|
Socket::PF_NDRV: Integer
|
2141
2513
|
|
2514
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2142
2515
|
# NetBIOS
|
2143
2516
|
#
|
2144
2517
|
Socket::PF_NETBIOS: Integer
|
2145
2518
|
|
2519
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2146
2520
|
# XEROX NS protocols
|
2147
2521
|
#
|
2148
2522
|
Socket::PF_NS: Integer
|
2149
2523
|
|
2524
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2150
2525
|
# ISO Open Systems Interconnection protocols
|
2151
2526
|
#
|
2152
2527
|
Socket::PF_OSI: Integer
|
2153
2528
|
|
2154
2529
|
Socket::PF_PIP: Integer
|
2155
2530
|
|
2531
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2156
2532
|
# Point-to-Point Protocol
|
2157
2533
|
#
|
2158
2534
|
Socket::PF_PPP: Integer
|
2159
2535
|
|
2536
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2160
2537
|
# PARC Universal Packet protocol
|
2161
2538
|
#
|
2162
2539
|
Socket::PF_PUP: Integer
|
2163
2540
|
|
2541
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2164
2542
|
# Internal routing protocol
|
2165
2543
|
#
|
2166
2544
|
Socket::PF_ROUTE: Integer
|
2167
2545
|
|
2168
2546
|
Socket::PF_RTIP: Integer
|
2169
2547
|
|
2548
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2170
2549
|
# Simple Internet Protocol
|
2171
2550
|
#
|
2172
2551
|
Socket::PF_SIP: Integer
|
2173
2552
|
|
2553
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2174
2554
|
# IBM SNA protocol
|
2175
2555
|
#
|
2176
2556
|
Socket::PF_SNA: Integer
|
2177
2557
|
|
2178
2558
|
Socket::PF_SYSTEM: Integer
|
2179
2559
|
|
2560
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2180
2561
|
# UNIX sockets
|
2181
2562
|
#
|
2182
2563
|
Socket::PF_UNIX: Integer
|
2183
2564
|
|
2565
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2184
2566
|
# Unspecified protocol, any supported address family
|
2185
2567
|
#
|
2186
2568
|
Socket::PF_UNSPEC: Integer
|
2187
2569
|
|
2570
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2188
2571
|
# eXpress Transfer Protocol
|
2189
2572
|
#
|
2190
2573
|
Socket::PF_XTP: Integer
|
2191
2574
|
|
2575
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2192
2576
|
# Process credentials
|
2193
2577
|
#
|
2194
2578
|
Socket::SCM_CREDS: Integer
|
2195
2579
|
|
2580
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2196
2581
|
# Access rights
|
2197
2582
|
#
|
2198
2583
|
Socket::SCM_RIGHTS: Integer
|
2199
2584
|
|
2585
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2200
2586
|
# Timestamp (timeval)
|
2201
2587
|
#
|
2202
2588
|
Socket::SCM_TIMESTAMP: Integer
|
2203
2589
|
|
2590
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2204
2591
|
# Shut down the reading side of the socket
|
2205
2592
|
#
|
2206
2593
|
Socket::SHUT_RD: Integer
|
2207
2594
|
|
2595
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2208
2596
|
# Shut down the both sides of the socket
|
2209
2597
|
#
|
2210
2598
|
Socket::SHUT_RDWR: Integer
|
2211
2599
|
|
2600
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2212
2601
|
# Shut down the writing side of the socket
|
2213
2602
|
#
|
2214
2603
|
Socket::SHUT_WR: Integer
|
2215
2604
|
|
2605
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2216
2606
|
# A datagram socket provides connectionless, unreliable messaging
|
2217
2607
|
#
|
2218
2608
|
Socket::SOCK_DGRAM: Integer
|
2219
2609
|
|
2610
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2220
2611
|
# A raw socket provides low-level access for direct access or implementing
|
2221
2612
|
# network protocols
|
2222
2613
|
#
|
2223
2614
|
Socket::SOCK_RAW: Integer
|
2224
2615
|
|
2616
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2225
2617
|
# A reliable datagram socket provides reliable delivery of messages
|
2226
2618
|
#
|
2227
2619
|
Socket::SOCK_RDM: Integer
|
2228
2620
|
|
2621
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2229
2622
|
# A sequential packet socket provides sequenced, reliable two-way connection for
|
2230
2623
|
# datagrams
|
2231
2624
|
#
|
2232
2625
|
Socket::SOCK_SEQPACKET: Integer
|
2233
2626
|
|
2627
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2234
2628
|
# A stream socket provides a sequenced, reliable two-way connection for a byte
|
2235
2629
|
# stream
|
2236
2630
|
#
|
2237
2631
|
Socket::SOCK_STREAM: Integer
|
2238
2632
|
|
2633
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2239
2634
|
# Socket-level options
|
2240
2635
|
#
|
2241
2636
|
Socket::SOL_SOCKET: Integer
|
2242
2637
|
|
2638
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2243
2639
|
# Maximum connection requests that may be queued for a socket
|
2244
2640
|
#
|
2245
2641
|
Socket::SOMAXCONN: Integer
|
2246
2642
|
|
2643
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2247
2644
|
# Socket has had listen() called on it
|
2248
2645
|
#
|
2249
2646
|
Socket::SO_ACCEPTCONN: Integer
|
2250
2647
|
|
2648
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2251
2649
|
# Permit sending of broadcast messages
|
2252
2650
|
#
|
2253
2651
|
Socket::SO_BROADCAST: Integer
|
2254
2652
|
|
2653
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2255
2654
|
# Debug info recording
|
2256
2655
|
#
|
2257
2656
|
Socket::SO_DEBUG: Integer
|
2258
2657
|
|
2658
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2259
2659
|
# Use interface addresses
|
2260
2660
|
#
|
2261
2661
|
Socket::SO_DONTROUTE: Integer
|
2262
2662
|
|
2663
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2263
2664
|
# Retain unread data
|
2264
2665
|
#
|
2265
2666
|
Socket::SO_DONTTRUNC: Integer
|
2266
2667
|
|
2668
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2267
2669
|
# Get and clear the error status
|
2268
2670
|
#
|
2269
2671
|
Socket::SO_ERROR: Integer
|
2270
2672
|
|
2673
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2271
2674
|
# Keep connections alive
|
2272
2675
|
#
|
2273
2676
|
Socket::SO_KEEPALIVE: Integer
|
2274
2677
|
|
2678
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2275
2679
|
# Linger on close if data is present
|
2276
2680
|
#
|
2277
2681
|
Socket::SO_LINGER: Integer
|
2278
2682
|
|
2683
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2279
2684
|
# Install socket-level Network Kernel Extension
|
2280
2685
|
#
|
2281
2686
|
Socket::SO_NKE: Integer
|
2282
2687
|
|
2688
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2283
2689
|
# Don't SIGPIPE on EPIPE
|
2284
2690
|
#
|
2285
2691
|
Socket::SO_NOSIGPIPE: Integer
|
2286
2692
|
|
2693
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2287
2694
|
# Get first packet byte count
|
2288
2695
|
#
|
2289
2696
|
Socket::SO_NREAD: Integer
|
2290
2697
|
|
2698
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2291
2699
|
# Leave received out-of-band data in-line
|
2292
2700
|
#
|
2293
2701
|
Socket::SO_OOBINLINE: Integer
|
2294
2702
|
|
2703
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2295
2704
|
# Receive buffer size
|
2296
2705
|
#
|
2297
2706
|
Socket::SO_RCVBUF: Integer
|
2298
2707
|
|
2708
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2299
2709
|
# Receive low-water mark
|
2300
2710
|
#
|
2301
2711
|
Socket::SO_RCVLOWAT: Integer
|
2302
2712
|
|
2713
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2303
2714
|
# Receive timeout
|
2304
2715
|
#
|
2305
2716
|
Socket::SO_RCVTIMEO: Integer
|
2306
2717
|
|
2718
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2307
2719
|
# Allow local address reuse
|
2308
2720
|
#
|
2309
2721
|
Socket::SO_REUSEADDR: Integer
|
2310
2722
|
|
2723
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2311
2724
|
# Allow local address and port reuse
|
2312
2725
|
#
|
2313
2726
|
Socket::SO_REUSEPORT: Integer
|
2314
2727
|
|
2728
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2315
2729
|
# Send buffer size
|
2316
2730
|
#
|
2317
2731
|
Socket::SO_SNDBUF: Integer
|
2318
2732
|
|
2733
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2319
2734
|
# Send low-water mark
|
2320
2735
|
#
|
2321
2736
|
Socket::SO_SNDLOWAT: Integer
|
2322
2737
|
|
2738
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2323
2739
|
# Send timeout
|
2324
2740
|
#
|
2325
2741
|
Socket::SO_SNDTIMEO: Integer
|
2326
2742
|
|
2743
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2327
2744
|
# Receive timestamp with datagrams (timeval)
|
2328
2745
|
#
|
2329
2746
|
Socket::SO_TIMESTAMP: Integer
|
2330
2747
|
|
2748
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2331
2749
|
# Get the socket type
|
2332
2750
|
#
|
2333
2751
|
Socket::SO_TYPE: Integer
|
2334
2752
|
|
2753
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2335
2754
|
# Bypass hardware when possible
|
2336
2755
|
#
|
2337
2756
|
Socket::SO_USELOOPBACK: Integer
|
2338
2757
|
|
2758
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2339
2759
|
# Give a hint when more data is ready
|
2340
2760
|
#
|
2341
2761
|
Socket::SO_WANTMORE: Integer
|
2342
2762
|
|
2763
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2343
2764
|
# OOB data is wanted in MSG_FLAG on receive
|
2344
2765
|
#
|
2345
2766
|
Socket::SO_WANTOOBFLAG: Integer
|
2346
2767
|
|
2768
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2347
2769
|
# Reduce step of the handshake process (Linux 3.7, glibc 2.18)
|
2348
2770
|
#
|
2349
2771
|
Socket::TCP_FASTOPEN: Integer
|
2350
2772
|
|
2773
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2351
2774
|
# Maximum number of keepalive probes allowed before dropping a connection (Linux
|
2352
2775
|
# 2.4, glibc 2.2)
|
2353
2776
|
#
|
2354
2777
|
Socket::TCP_KEEPCNT: Integer
|
2355
2778
|
|
2779
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2356
2780
|
# Time between keepalive probes (Linux 2.4, glibc 2.2)
|
2357
2781
|
#
|
2358
2782
|
Socket::TCP_KEEPINTVL: Integer
|
2359
2783
|
|
2784
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2360
2785
|
# Set maximum segment size
|
2361
2786
|
#
|
2362
2787
|
Socket::TCP_MAXSEG: Integer
|
2363
2788
|
|
2789
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2364
2790
|
# Don't delay sending to coalesce packets
|
2365
2791
|
#
|
2366
2792
|
Socket::TCP_NODELAY: Integer
|
2367
2793
|
|
2794
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2368
2795
|
# Don't use TCP options
|
2369
2796
|
#
|
2370
2797
|
Socket::TCP_NOOPT: Integer
|
2371
2798
|
|
2799
|
+
# <!-- rdoc-file=ext/socket/constdefs.c -->
|
2372
2800
|
# Don't push the last block of write
|
2373
2801
|
#
|
2374
2802
|
Socket::TCP_NOPUSH: Integer
|
2375
2803
|
|
2804
|
+
# <!-- rdoc-file=ext/socket/ifaddr.c -->
|
2376
2805
|
# Socket::Ifaddr represents a result of getifaddrs() function.
|
2806
|
+
#
|
2377
2807
|
class Socket::Ifaddr
|
2378
2808
|
public
|
2379
2809
|
|
2810
|
+
# <!--
|
2811
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2812
|
+
# - ifaddr.addr => addrinfo
|
2813
|
+
# -->
|
2380
2814
|
# Returns the address of *ifaddr*. nil is returned if address is not available
|
2381
2815
|
# in *ifaddr*.
|
2382
2816
|
#
|
2383
2817
|
def addr: () -> Addrinfo?
|
2384
2818
|
|
2819
|
+
# <!--
|
2820
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2821
|
+
# - ifaddr.broadaddr => addrinfo
|
2822
|
+
# -->
|
2385
2823
|
# Returns the broadcast address of *ifaddr*. nil is returned if the flags
|
2386
2824
|
# doesn't have IFF_BROADCAST.
|
2387
2825
|
#
|
2388
2826
|
def broadaddr: () -> Addrinfo?
|
2389
2827
|
|
2828
|
+
# <!--
|
2829
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2830
|
+
# - ifaddr.dstaddr => addrinfo
|
2831
|
+
# -->
|
2390
2832
|
# Returns the destination address of *ifaddr*. nil is returned if the flags
|
2391
2833
|
# doesn't have IFF_POINTOPOINT.
|
2392
2834
|
#
|
2393
2835
|
def dstaddr: () -> Addrinfo?
|
2394
2836
|
|
2837
|
+
# <!--
|
2838
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2839
|
+
# - ifaddr.flags => integer
|
2840
|
+
# -->
|
2395
2841
|
# Returns the flags of *ifaddr*.
|
2396
2842
|
#
|
2397
2843
|
def flags: () -> Integer
|
2398
2844
|
|
2845
|
+
# <!--
|
2846
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2847
|
+
# - ifaddr.ifindex => integer
|
2848
|
+
# -->
|
2399
2849
|
# Returns the interface index of *ifaddr*.
|
2400
2850
|
#
|
2401
2851
|
def ifindex: () -> Integer
|
2402
2852
|
|
2853
|
+
# <!--
|
2854
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2855
|
+
# - ifaddr.inspect => string
|
2856
|
+
# -->
|
2403
2857
|
# Returns a string to show contents of *ifaddr*.
|
2404
2858
|
#
|
2405
2859
|
def inspect: () -> String
|
2406
2860
|
|
2861
|
+
# <!--
|
2862
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2863
|
+
# - ifaddr.name => string
|
2864
|
+
# -->
|
2407
2865
|
# Returns the interface name of *ifaddr*.
|
2408
2866
|
#
|
2409
2867
|
def name: () -> String
|
2410
2868
|
|
2869
|
+
# <!--
|
2870
|
+
# rdoc-file=ext/socket/ifaddr.c
|
2871
|
+
# - ifaddr.netmask => addrinfo
|
2872
|
+
# -->
|
2411
2873
|
# Returns the netmask address of *ifaddr*. nil is returned if netmask is not
|
2412
2874
|
# available in *ifaddr*.
|
2413
2875
|
#
|
2414
2876
|
def netmask: () -> Addrinfo?
|
2415
2877
|
end
|
2416
2878
|
|
2879
|
+
# <!-- rdoc-file=ext/socket/lib/socket.rb -->
|
2417
2880
|
# UDP/IP address information used by Socket.udp_server_loop.
|
2881
|
+
#
|
2418
2882
|
class Socket::UDPSource
|
2419
2883
|
public
|
2420
2884
|
|
2421
2885
|
def inspect: () -> String
|
2422
2886
|
|
2887
|
+
# <!-- rdoc-file=ext/socket/lib/socket.rb -->
|
2423
2888
|
# Local address
|
2424
2889
|
#
|
2425
2890
|
def local_address: () -> Addrinfo
|
2426
2891
|
|
2892
|
+
# <!-- rdoc-file=ext/socket/lib/socket.rb -->
|
2427
2893
|
# Address of the source
|
2428
2894
|
#
|
2429
2895
|
def remote_address: () -> Addrinfo
|
2430
2896
|
|
2897
|
+
# <!--
|
2898
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
2899
|
+
# - reply(msg)
|
2900
|
+
# -->
|
2431
2901
|
# Sends the String `msg` to the source
|
2432
2902
|
#
|
2433
2903
|
def reply: (String msg) -> void
|
2434
2904
|
|
2435
2905
|
private
|
2436
2906
|
|
2907
|
+
# <!--
|
2908
|
+
# rdoc-file=ext/socket/lib/socket.rb
|
2909
|
+
# - new(remote_address, local_address, &reply_proc)
|
2910
|
+
# -->
|
2437
2911
|
# `remote_address` is an Addrinfo object.
|
2438
2912
|
#
|
2439
2913
|
# `local_address` is an Addrinfo object.
|
@@ -2443,10 +2917,16 @@ class Socket::UDPSource
|
|
2443
2917
|
def initialize: (Addrinfo remote_address, Addrinfo local_address) { (String) -> void } -> void
|
2444
2918
|
end
|
2445
2919
|
|
2920
|
+
# <!-- rdoc-file=ext/socket/ancdata.c -->
|
2446
2921
|
# Socket::AncillaryData represents the ancillary data (control information) used
|
2447
2922
|
# by sendmsg and recvmsg system call. It contains socket #family, control
|
2448
2923
|
# message (cmsg) #level, cmsg #type and cmsg #data.
|
2924
|
+
#
|
2449
2925
|
class Socket::AncillaryData
|
2926
|
+
# <!--
|
2927
|
+
# rdoc-file=ext/socket/ancdata.c
|
2928
|
+
# - Socket::AncillaryData.int(family, cmsg_level, cmsg_type, integer) => ancillarydata
|
2929
|
+
# -->
|
2450
2930
|
# Creates a new Socket::AncillaryData object which contains a int as data.
|
2451
2931
|
#
|
2452
2932
|
# The size and endian is dependent on the host.
|
@@ -2458,6 +2938,11 @@ class Socket::AncillaryData
|
|
2458
2938
|
#
|
2459
2939
|
def self.int: (Symbol, Symbol, Symbol, Symbol) -> instance
|
2460
2940
|
|
2941
|
+
# <!--
|
2942
|
+
# rdoc-file=ext/socket/ancdata.c
|
2943
|
+
# - Socket::AncillaryData.ip_pktinfo(addr, ifindex) => ancdata
|
2944
|
+
# - Socket::AncillaryData.ip_pktinfo(addr, ifindex, spec_dst) => ancdata
|
2945
|
+
# -->
|
2461
2946
|
# Returns new ancillary data for IP_PKTINFO.
|
2462
2947
|
#
|
2463
2948
|
# If spec_dst is not given, addr is used.
|
@@ -2474,6 +2959,10 @@ class Socket::AncillaryData
|
|
2474
2959
|
#
|
2475
2960
|
def self.ip_pktinfo: (Addrinfo addr, Integer ifindex, ?Addrinfo spec_dst) -> instance
|
2476
2961
|
|
2962
|
+
# <!--
|
2963
|
+
# rdoc-file=ext/socket/ancdata.c
|
2964
|
+
# - Socket::AncillaryData.ipv6_pktinfo(addr, ifindex) => ancdata
|
2965
|
+
# -->
|
2477
2966
|
# Returns new ancillary data for IPV6_PKTINFO.
|
2478
2967
|
#
|
2479
2968
|
# IPV6_PKTINFO is defined by RFC 3542.
|
@@ -2485,6 +2974,10 @@ class Socket::AncillaryData
|
|
2485
2974
|
#
|
2486
2975
|
def self.ipv6_pktinfo: (Addrinfo addr, Integer ifindex) -> instance
|
2487
2976
|
|
2977
|
+
# <!--
|
2978
|
+
# rdoc-file=ext/socket/ancdata.c
|
2979
|
+
# - Socket::AncillaryData.unix_rights(io1, io2, ...) => ancillarydata
|
2980
|
+
# -->
|
2488
2981
|
# Creates a new Socket::AncillaryData object which contains file descriptors as
|
2489
2982
|
# data.
|
2490
2983
|
#
|
@@ -2495,6 +2988,10 @@ class Socket::AncillaryData
|
|
2495
2988
|
|
2496
2989
|
public
|
2497
2990
|
|
2991
|
+
# <!--
|
2992
|
+
# rdoc-file=ext/socket/ancdata.c
|
2993
|
+
# - ancillarydata.cmsg_is?(level, type) => true or false
|
2994
|
+
# -->
|
2498
2995
|
# tests the level and type of *ancillarydata*.
|
2499
2996
|
#
|
2500
2997
|
# ancdata = Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "")
|
@@ -2505,6 +3002,10 @@ class Socket::AncillaryData
|
|
2505
3002
|
#
|
2506
3003
|
def cmsg_is?: (Integer level, Integer ancillary_type) -> bool
|
2507
3004
|
|
3005
|
+
# <!--
|
3006
|
+
# rdoc-file=ext/socket/ancdata.c
|
3007
|
+
# - ancillarydata.data => string
|
3008
|
+
# -->
|
2508
3009
|
# returns the cmsg data as a string.
|
2509
3010
|
#
|
2510
3011
|
# p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").data
|
@@ -2512,6 +3013,10 @@ class Socket::AncillaryData
|
|
2512
3013
|
#
|
2513
3014
|
def data: () -> String
|
2514
3015
|
|
3016
|
+
# <!--
|
3017
|
+
# rdoc-file=ext/socket/ancdata.c
|
3018
|
+
# - ancillarydata.family => integer
|
3019
|
+
# -->
|
2515
3020
|
# returns the socket family as an integer.
|
2516
3021
|
#
|
2517
3022
|
# p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").family
|
@@ -2519,6 +3024,10 @@ class Socket::AncillaryData
|
|
2519
3024
|
#
|
2520
3025
|
def family: () -> Integer
|
2521
3026
|
|
3027
|
+
# <!--
|
3028
|
+
# rdoc-file=ext/socket/ancdata.c
|
3029
|
+
# - ancillarydata.inspect => string
|
3030
|
+
# -->
|
2522
3031
|
# returns a string which shows ancillarydata in human-readable form.
|
2523
3032
|
#
|
2524
3033
|
# p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").inspect
|
@@ -2526,6 +3035,10 @@ class Socket::AncillaryData
|
|
2526
3035
|
#
|
2527
3036
|
def inspect: () -> String
|
2528
3037
|
|
3038
|
+
# <!--
|
3039
|
+
# rdoc-file=ext/socket/ancdata.c
|
3040
|
+
# - ancillarydata.int => integer
|
3041
|
+
# -->
|
2529
3042
|
# Returns the data in *ancillarydata* as an int.
|
2530
3043
|
#
|
2531
3044
|
# The size and endian is dependent on the host.
|
@@ -2535,6 +3048,10 @@ class Socket::AncillaryData
|
|
2535
3048
|
#
|
2536
3049
|
def int: () -> Integer
|
2537
3050
|
|
3051
|
+
# <!--
|
3052
|
+
# rdoc-file=ext/socket/ancdata.c
|
3053
|
+
# - ancdata.ip_pktinfo => [addr, ifindex, spec_dst]
|
3054
|
+
# -->
|
2538
3055
|
# Extracts addr, ifindex and spec_dst from IP_PKTINFO ancillary data.
|
2539
3056
|
#
|
2540
3057
|
# IP_PKTINFO is not standard.
|
@@ -2548,8 +3065,12 @@ class Socket::AncillaryData
|
|
2548
3065
|
# p ancdata.ip_pktinfo
|
2549
3066
|
# #=> [#<Addrinfo: 127.0.0.1>, 0, #<Addrinfo: 127.0.0.1>]
|
2550
3067
|
#
|
2551
|
-
def ip_pktinfo: () -> [Addrinfo, Integer, Addrinfo]
|
3068
|
+
def ip_pktinfo: () -> [ Addrinfo, Integer, Addrinfo ]
|
2552
3069
|
|
3070
|
+
# <!--
|
3071
|
+
# rdoc-file=ext/socket/ancdata.c
|
3072
|
+
# - ancdata.ipv6_pktinfo => [addr, ifindex]
|
3073
|
+
# -->
|
2553
3074
|
# Extracts addr and ifindex from IPV6_PKTINFO ancillary data.
|
2554
3075
|
#
|
2555
3076
|
# IPV6_PKTINFO is defined by RFC 3542.
|
@@ -2559,8 +3080,12 @@ class Socket::AncillaryData
|
|
2559
3080
|
# ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
|
2560
3081
|
# p ancdata.ipv6_pktinfo #=> [#<Addrinfo: ::1>, 0]
|
2561
3082
|
#
|
2562
|
-
def ipv6_pktinfo: () -> [Addrinfo, Integer]
|
3083
|
+
def ipv6_pktinfo: () -> [ Addrinfo, Integer ]
|
2563
3084
|
|
3085
|
+
# <!--
|
3086
|
+
# rdoc-file=ext/socket/ancdata.c
|
3087
|
+
# - ancdata.ipv6_pktinfo_addr => addr
|
3088
|
+
# -->
|
2564
3089
|
# Extracts addr from IPV6_PKTINFO ancillary data.
|
2565
3090
|
#
|
2566
3091
|
# IPV6_PKTINFO is defined by RFC 3542.
|
@@ -2572,6 +3097,10 @@ class Socket::AncillaryData
|
|
2572
3097
|
#
|
2573
3098
|
def ipv6_pktinfo_addr: () -> Addrinfo
|
2574
3099
|
|
3100
|
+
# <!--
|
3101
|
+
# rdoc-file=ext/socket/ancdata.c
|
3102
|
+
# - ancdata.ipv6_pktinfo_ifindex => addr
|
3103
|
+
# -->
|
2575
3104
|
# Extracts ifindex from IPV6_PKTINFO ancillary data.
|
2576
3105
|
#
|
2577
3106
|
# IPV6_PKTINFO is defined by RFC 3542.
|
@@ -2583,6 +3112,10 @@ class Socket::AncillaryData
|
|
2583
3112
|
#
|
2584
3113
|
def ipv6_pktinfo_ifindex: () -> Integer
|
2585
3114
|
|
3115
|
+
# <!--
|
3116
|
+
# rdoc-file=ext/socket/ancdata.c
|
3117
|
+
# - ancillarydata.level => integer
|
3118
|
+
# -->
|
2586
3119
|
# returns the cmsg level as an integer.
|
2587
3120
|
#
|
2588
3121
|
# p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").level
|
@@ -2590,6 +3123,10 @@ class Socket::AncillaryData
|
|
2590
3123
|
#
|
2591
3124
|
def level: () -> Integer
|
2592
3125
|
|
3126
|
+
# <!--
|
3127
|
+
# rdoc-file=ext/socket/ancdata.c
|
3128
|
+
# - ancillarydata.timestamp => time
|
3129
|
+
# -->
|
2593
3130
|
# returns the timestamp as a time object.
|
2594
3131
|
#
|
2595
3132
|
# *ancillarydata* should be one of following type:
|
@@ -2612,9 +3149,12 @@ class Socket::AncillaryData
|
|
2612
3149
|
#
|
2613
3150
|
# }
|
2614
3151
|
#
|
2615
|
-
#
|
2616
3152
|
def timestamp: () -> Time
|
2617
3153
|
|
3154
|
+
# <!--
|
3155
|
+
# rdoc-file=ext/socket/ancdata.c
|
3156
|
+
# - ancillarydata.type => integer
|
3157
|
+
# -->
|
2618
3158
|
# returns the cmsg type as an integer.
|
2619
3159
|
#
|
2620
3160
|
# p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").type
|
@@ -2622,6 +3162,10 @@ class Socket::AncillaryData
|
|
2622
3162
|
#
|
2623
3163
|
def type: () -> Integer
|
2624
3164
|
|
3165
|
+
# <!--
|
3166
|
+
# rdoc-file=ext/socket/ancdata.c
|
3167
|
+
# - ancillarydata.unix_rights => array-of-IOs or nil
|
3168
|
+
# -->
|
2625
3169
|
# returns the array of IO objects for SCM_RIGHTS control message in UNIX domain
|
2626
3170
|
# socket.
|
2627
3171
|
#
|
@@ -2652,6 +3196,10 @@ class Socket::AncillaryData
|
|
2652
3196
|
|
2653
3197
|
private
|
2654
3198
|
|
3199
|
+
# <!--
|
3200
|
+
# rdoc-file=ext/socket/ancdata.c
|
3201
|
+
# - Socket::AncillaryData.new(family, cmsg_level, cmsg_type, cmsg_data) -> ancillarydata
|
3202
|
+
# -->
|
2655
3203
|
# *family* should be an integer, a string or a symbol.
|
2656
3204
|
# * Socket::AF_INET, "AF_INET", "INET", :AF_INET, :INET
|
2657
3205
|
# * Socket::AF_UNIX, "AF_UNIX", "UNIX", :AF_UNIX, :UNIX
|