async-io 1.38.1 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/io/endpoint.rb +0 -17
- data/lib/async/io/shared_endpoint.rb +14 -2
- data/lib/async/io/ssl_endpoint.rb +3 -1
- data/lib/async/io/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35ab781a6326f6ba8743f953608e78b6bfc95de508667cc6a07999e2f0564607
|
4
|
+
data.tar.gz: b77dcb0fc4ede58d173be22808e040fb17f79228263cf7b8be7cb758e54d2638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fff9ad34a8396466dadfb4d8a96b9d8aeb1601219b0586aa248ef7907894e4f2f795453f48e8337f07675f8d7092fdb460d4692d8082439b2fa6df6d7023ca4c
|
7
|
+
data.tar.gz: 69dd0d6fd8d17c4768ff75d1f5fd29939e454b96735b98c94fef47f5deeb515d6193517f56a8c7c4457238e18630fa0d8db423e7e76dc4562be6a24349891a1d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/io/endpoint.rb
CHANGED
@@ -78,23 +78,6 @@ module Async
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
# Map all endpoints by invoking `#bind`.
|
82
|
-
# @yield the bound wrapper.
|
83
|
-
def bound
|
84
|
-
wrappers = []
|
85
|
-
|
86
|
-
self.each do |endpoint|
|
87
|
-
wrapper = endpoint.bind
|
88
|
-
wrappers << wrapper
|
89
|
-
|
90
|
-
yield wrapper
|
91
|
-
end
|
92
|
-
|
93
|
-
return wrappers
|
94
|
-
ensure
|
95
|
-
wrappers.each(&:close) if $!
|
96
|
-
end
|
97
|
-
|
98
81
|
# Create an Endpoint instance by URI scheme. The host and port of the URI will be passed to the Endpoint factory method, along with any options.
|
99
82
|
#
|
100
83
|
# @param string [String] URI as string. Scheme will decide implementation used.
|
@@ -12,8 +12,10 @@ module Async
|
|
12
12
|
# Pre-connect and pre-bind sockets so that it can be used between processes.
|
13
13
|
class SharedEndpoint < Endpoint
|
14
14
|
# Create a new `SharedEndpoint` by binding to the given endpoint.
|
15
|
-
def self.bound(endpoint, backlog: Socket::SOMAXCONN, close_on_exec: false)
|
16
|
-
|
15
|
+
def self.bound(endpoint, backlog: Socket::SOMAXCONN, close_on_exec: false, **options)
|
16
|
+
sockets = Array(endpoint.bind(**options))
|
17
|
+
|
18
|
+
wrappers = sockets.each do |server|
|
17
19
|
# This is somewhat optional. We want to have a generic interface as much as possible so that users of this interface can just call it without knowing a lot of internal details. Therefore, we ignore errors here if it's because the underlying socket does not support the operation.
|
18
20
|
begin
|
19
21
|
server.listen(backlog)
|
@@ -117,5 +119,15 @@ module Async
|
|
117
119
|
"\#<#{self.class} #{@wrappers.size} descriptors for #{@endpoint}>"
|
118
120
|
end
|
119
121
|
end
|
122
|
+
|
123
|
+
class Endpoint
|
124
|
+
def bound(**options)
|
125
|
+
SharedEndpoint.bound(self, **options)
|
126
|
+
end
|
127
|
+
|
128
|
+
def connected(**options)
|
129
|
+
SharedEndpoint.connected(self, **options)
|
130
|
+
end
|
131
|
+
end
|
120
132
|
end
|
121
133
|
end
|
data/lib/async/io/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.39.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -46,7 +46,7 @@ cert_chain:
|
|
46
46
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
47
47
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
48
48
|
-----END CERTIFICATE-----
|
49
|
-
date:
|
49
|
+
date: 2024-01-22 00:00:00.000000000 Z
|
50
50
|
dependencies:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: async
|
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
|
-
rubygems_version: 3.4.
|
206
|
+
rubygems_version: 3.4.22
|
207
207
|
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: Provides support for asynchonous TCP, UDP, UNIX and SSL sockets.
|
metadata.gz.sig
CHANGED
Binary file
|