async-io 1.3.0 → 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 152518b09c63b90c002c9e4fa832d075898c75e613cc0405e8b1df947f0c3bdd
4
- data.tar.gz: 4ddb1b1b688bbc37bfc6beb705866706aba4f1e43efe53126b03e0f3f57c4733
3
+ metadata.gz: 8b5507d72c8c7e07851a347dc15eacfbb51f06a03a50ef438af12bb889b28a8c
4
+ data.tar.gz: b53e91190155fad15b9a8097ec5243a8af5fc81623f4acb2e68f5d1591752868
5
5
  SHA512:
6
- metadata.gz: b057c8c881f386afa0151fa220a9b51660b2487d124e8c45dbc45c240c2c682e83fd16b8c92c69b311bc2ae0d3b638fec4218ceb7e76c417367fcbc0852ec9be
7
- data.tar.gz: db8b25d2bbc5c069586ce61f17a030b9469d22b1173b618adf826dabdffe5251f3e4e387338adeb89fee93dafd303365e729cdf8cf3217401f9d306b10152e95
6
+ metadata.gz: dbbf5038f8a3d9bed87b8d51a81a34b2c454cb79a80405a560c857d1cfab1ec49e8ca75363eec37f0e71ff3dc2c177b7394b8562a2b7a965c01e9a67af0134a9
7
+ data.tar.gz: 2885f7b39a0bed3e4091900768499d3c0837a82b19e7cd5fb7d8770655a6f678283b4d49af2f195666b4fb6ffd003c093167f3d6ec7ce2f37ecbae436469a596
@@ -5,11 +5,10 @@ cache: bundler
5
5
 
6
6
  matrix:
7
7
  include:
8
- - rvm: 2.0
9
- - rvm: 2.1
10
8
  - rvm: 2.2
11
9
  - rvm: 2.3
12
10
  - rvm: 2.4
11
+ - rvm: 2.5
13
12
  - rvm: jruby-head
14
13
  env: JRUBY_OPTS="--debug -X+O"
15
14
  - rvm: ruby-head
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.require_paths = ["lib"]
17
17
  spec.has_rdoc = "yard"
18
18
 
19
- spec.add_dependency "async", "~> 1.0"
19
+ spec.add_dependency "async", "~> 1.3"
20
20
  spec.add_development_dependency "async-rspec", "~> 1.2"
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.3"
@@ -69,14 +69,12 @@ module Async
69
69
  def wrap(*args)
70
70
  wrapper = self.new(@wrapped_klass.new(*args))
71
71
 
72
- if block_given?
73
- begin
74
- yield wrapper
75
- ensure
76
- wrapper.close
77
- end
78
- else
79
- return wrapper
72
+ return wrapper unless block_given?
73
+
74
+ begin
75
+ yield wrapper
76
+ ensure
77
+ wrapper.close
80
78
  end
81
79
  end
82
80
  end
@@ -133,6 +131,7 @@ module Async
133
131
  end
134
132
  end
135
133
  else
134
+ # This is also correct for Rubinius.
136
135
  def async_send(*args)
137
136
  async do
138
137
  @io.__send__(*args)
@@ -43,8 +43,6 @@ module Async
43
43
  def wait
44
44
  wrapper = Async::IO::Generic.new(@input)
45
45
  wrapper.read(1)
46
- ensure
47
- wrapper.send(:close_monitor) if wrapper
48
46
  end
49
47
 
50
48
  # Signal to a given task that it should resume operations.
@@ -45,18 +45,16 @@ module Async
45
45
 
46
46
  wrapper = Socket.new(peer, self.reactor)
47
47
 
48
- if block_given?
49
- task.async do |task|
50
- task.annotate "incoming connection #{address.inspect}"
51
-
52
- begin
53
- yield wrapper, address
54
- ensure
55
- wrapper.close
56
- end
48
+ return wrapper, address unless block_given?
49
+
50
+ task.async do |task|
51
+ task.annotate "incoming connection #{address.inspect}"
52
+
53
+ begin
54
+ yield wrapper, address
55
+ ensure
56
+ wrapper.close
57
57
  end
58
- else
59
- return wrapper, address
60
58
  end
61
59
  end
62
60
 
@@ -124,14 +122,12 @@ module Async
124
122
  raise
125
123
  end
126
124
 
127
- if block_given?
128
- begin
129
- yield wrapper, task
130
- ensure
131
- wrapper.close
132
- end
133
- else
134
- return wrapper
125
+ return wrapper unless block_given?
126
+
127
+ begin
128
+ yield wrapper, task
129
+ ensure
130
+ wrapper.close
135
131
  end
136
132
  end
137
133
 
@@ -150,14 +146,12 @@ module Async
150
146
  socket.bind(local_address.to_sockaddr)
151
147
  end
152
148
 
153
- if block_given?
154
- begin
155
- yield wrapper, task
156
- ensure
157
- wrapper.close
158
- end
159
- else
160
- return wrapper
149
+ return wrapper unless block_given?
150
+
151
+ begin
152
+ yield wrapper, task
153
+ ensure
154
+ wrapper.close
161
155
  end
162
156
  end
163
157
 
@@ -76,22 +76,20 @@ module Async
76
76
 
77
77
  wrapper = SSLSocket.connect_socket(peer, @context)
78
78
 
79
- if block_given?
80
- task.async do
81
- task.annotate "accepting secure connection #{address}"
79
+ return wrapper, address unless block_given?
80
+
81
+ task.async do
82
+ task.annotate "accepting secure connection #{address}"
83
+
84
+ begin
85
+ wrapper.accept
82
86
 
83
- begin
84
- wrapper.accept
85
-
86
- yield wrapper, address
87
- rescue SSLError
88
- Async.logger.error($!.class) {$!}
89
- ensure
90
- wrapper.close
91
- end
87
+ yield wrapper, address
88
+ rescue SSLError
89
+ Async.logger.error($!.class) {$!}
90
+ ensure
91
+ wrapper.close
92
92
  end
93
- else
94
- return wrapper, address
95
93
  end
96
94
  end
97
95
  end
@@ -24,10 +24,13 @@ require_relative 'generic'
24
24
  module Async
25
25
  module IO
26
26
  class Stream
27
- def initialize(io, block_size: 1024*8)
27
+ def initialize(io, block_size: 1024*8, sync: true)
28
28
  @io = io
29
29
  @eof = false
30
30
 
31
+ # We don't want Ruby to do any IO buffering.
32
+ @io.sync = sync
33
+
31
34
  @block_size = block_size
32
35
 
33
36
  @read_buffer = BinaryString.new
@@ -74,6 +77,20 @@ module Async
74
77
  @write_buffer.clear
75
78
  end
76
79
 
80
+ def gets(separator = $/)
81
+ flush
82
+
83
+ read_until(separator)
84
+ end
85
+
86
+ def puts(*args, separator: $/)
87
+ args.each do |arg|
88
+ @write_buffer << arg << separator
89
+ end
90
+
91
+ flush
92
+ end
93
+
77
94
  # Closes the stream and flushes any unwritten data.
78
95
  def close
79
96
  flush rescue nil
@@ -19,19 +19,61 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require_relative 'socket'
22
+ require_relative 'stream'
23
+ require 'fcntl'
22
24
 
23
25
  module Async
24
26
  module IO
25
27
  # Asynchronous TCP socket wrapper.
26
28
  class TCPSocket < IPSocket
27
29
  wraps ::TCPSocket
30
+
31
+ def initialize(remote_host, remote_port = nil, local_host = nil, local_port = nil)
32
+ if remote_host.is_a? ::TCPSocket
33
+ super(remote_host)
34
+ else
35
+ remote_address = Addrinfo.tcp(remote_host, remote_port)
36
+ local_address = Addrinfo.tcp(local_host, local_port) if local_host
37
+
38
+ # We do this unusual dance to avoid leaking an "open" socket instance.
39
+ socket = Socket.connect(remote_address, local_address)
40
+ fd = socket.fcntl(Fcntl::F_DUPFD)
41
+ socket.close
42
+
43
+ super(::TCPSocket.for_fd(fd))
44
+
45
+ # The equivalent blocking operation. Unfortunately there is no trivial way to make this non-blocking.
46
+ # super(::TCPSocket.new(remote_host, remote_port, local_host, local_port))
47
+ end
48
+
49
+ @buffer = Stream.new(self)
50
+ end
51
+
52
+ attr :buffer
53
+
54
+ def_delegators :@buffer, :gets, :puts, :flush
28
55
  end
29
56
 
30
57
  # Asynchronous TCP server wrappper.
31
58
  class TCPServer < TCPSocket
32
59
  wraps ::TCPServer, :listen
33
60
 
34
- include ServerSocket
61
+ def initialize(*args)
62
+ if args.first.is_a? ::TCPServer
63
+ super(args.first)
64
+ else
65
+ # We assume this operation doesn't block (for long):
66
+ super(::TCPServer.new(*args))
67
+ end
68
+ end
69
+
70
+ def accept(task: Task.current)
71
+ peer, address = async_send(:accept_nonblock)
72
+
73
+ wrapper = TCPSocket.new(peer)
74
+
75
+ return wrapper, address
76
+ end
35
77
  end
36
78
  end
37
79
  end
@@ -26,8 +26,16 @@ module Async
26
26
  class UDPSocket < IPSocket
27
27
  wraps ::UDPSocket, :bind
28
28
 
29
+ def initialize(family)
30
+ if family.is_a? ::UDPSocket
31
+ super(family)
32
+ else
33
+ super(::UDPSocket.new(family))
34
+ end
35
+ end
36
+
29
37
  # We pass `send` through directly, but in theory it might block. Internally, it uses sendto.
30
- def_delegators :@io, :send
38
+ def_delegators :@io, :send, :connect
31
39
 
32
40
  # This function is so fucked. Why does `UDPSocket#recvfrom` return the remote address as an array, but `Socket#recfrom` return it as an `Addrinfo`? You should prefer `recvmsg`.
33
41
  wrap_blocking_method :recvfrom, :recvfrom_nonblock
@@ -34,17 +34,14 @@ module Async
34
34
 
35
35
  def accept
36
36
  peer = async_send(:accept_nonblock)
37
+ wrapper = UNIXSocket.new(peer, self.reactor)
37
38
 
38
- if block_given?
39
- wrapper = UNIXSocket.new(peer, self.reactor)
40
-
41
- begin
42
- yield wrapper
43
- ensure
44
- wrapper.close
45
- end
46
- else
47
- return UNIXSocket.new(peer, self.reactor)
39
+ return wrapper unless block_given?
40
+
41
+ begin
42
+ yield wrapper
43
+ ensure
44
+ wrapper.close
48
45
  end
49
46
  end
50
47
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module IO
23
- VERSION = "1.3.0"
23
+ VERSION = "1.4.0"
24
24
  end
25
25
  end
@@ -0,0 +1,115 @@
1
+ # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'async/io/tcp_socket'
22
+
23
+ RSpec.describe Async::Reactor do
24
+ include_context Async::RSpec::Leaks
25
+
26
+ # Shared port for localhost network tests.
27
+ let(:server_address) {Async::IO::Address.tcp("localhost", 6788)}
28
+ let(:data) {"The quick brown fox jumped over the lazy dog."}
29
+
30
+ around(:each) do |example|
31
+ # Accept a single incoming connection and then finish.
32
+ subject.async do |task|
33
+ Async::IO::Socket.bind(server_address) do |server|
34
+ server.listen(10)
35
+
36
+ server.accept do |peer, address|
37
+ data = peer.read(512)
38
+ peer.write(data)
39
+ end
40
+ end
41
+ end
42
+
43
+ result = example.run
44
+
45
+ if result.is_a? Exception
46
+ result
47
+ else
48
+ subject.run
49
+ end
50
+ end
51
+
52
+ describe 'basic tcp server' do
53
+ it "should start server and send data" do
54
+ subject.async do
55
+ Async::IO::Socket.connect(server_address) do |client|
56
+ client.write(data)
57
+ expect(client.read(512)).to be == data
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
+ describe 'non-blocking tcp connect' do
64
+ it "should start server and send data" do
65
+ subject.async do |task|
66
+ Async::IO::Socket.connect(server_address) do |client|
67
+ client.write(data)
68
+ expect(client.read(512)).to be == data
69
+ end
70
+ end
71
+ end
72
+
73
+ it "can connect socket and read/write in a different task" do
74
+ socket = nil
75
+
76
+ subject.async do |task|
77
+ socket = Async::IO::Socket.connect(server_address)
78
+
79
+ # Stop the reactor once the connection was made.
80
+ subject.stop
81
+ end
82
+
83
+ subject.run
84
+
85
+ expect(socket).to_not be_nil
86
+ expect(socket).to be_kind_of Async::Wrapper
87
+
88
+ subject.async do
89
+ socket.write(data)
90
+
91
+ expect(socket.read(512)).to be == data
92
+ end
93
+
94
+ subject.run
95
+
96
+ socket.close
97
+ end
98
+
99
+ it "can't use a socket in nested tasks" do
100
+ subject.async do |task|
101
+ socket = Async::IO::Socket.connect(server_address)
102
+ expect(socket).to be_kind_of Async::Wrapper
103
+
104
+ expect do
105
+ subject.async do
106
+ socket.write(data)
107
+ # expect(socket.read(512)).to be == data
108
+ end
109
+ end.to_not raise_error
110
+
111
+ socket.close
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,73 @@
1
+ # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'async/io/udp_socket'
22
+
23
+ RSpec.describe Async::Reactor do
24
+ include_context Async::RSpec::Leaks
25
+
26
+ # Shared port for localhost network tests.
27
+ let(:server_address) {Async::IO::Address.udp("127.0.0.1", 6778)}
28
+ let(:data) {"The quick brown fox jumped over the lazy dog."}
29
+
30
+ describe 'basic udp server' do
31
+ it "should echo data back to peer" do
32
+ subject.async do
33
+ Async::IO::Socket.bind(server_address) do |server|
34
+ packet, address = server.recvfrom(512)
35
+
36
+ server.send(packet, 0, address)
37
+ end
38
+ end
39
+
40
+ subject.async do
41
+ Async::IO::Socket.connect(server_address) do |client|
42
+ client.send(data)
43
+ response = client.recv(512)
44
+
45
+ expect(response).to be == data
46
+ end
47
+ end
48
+
49
+ subject.run
50
+ end
51
+
52
+ it "should use unconnected socket" do
53
+ subject.async do
54
+ Async::IO::Socket.bind(server_address) do |server|
55
+ packet, address = server.recvfrom(512)
56
+
57
+ server.send(packet, 0, address)
58
+ end
59
+ end
60
+
61
+ subject.async do
62
+ Async::IO::UDPSocket.wrap(server_address.afamily) do |client|
63
+ client.send(data, 0, server_address)
64
+ response, address = client.recvfrom(512)
65
+
66
+ expect(response).to be == data
67
+ end
68
+ end
69
+
70
+ subject.run
71
+ end
72
+ end
73
+ end
@@ -5,7 +5,7 @@
5
5
  # in the Software without restriction, including without limitation the rights
6
6
  # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
7
  # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
8
+ # furnished to do so, reactor to the following conditions:
9
9
  #
10
10
  # The above copyright notice and this permission notice shall be included in
11
11
  # all copies or substantial portions of the Software.
@@ -20,96 +20,34 @@
20
20
 
21
21
  require 'async/io/tcp_socket'
22
22
 
23
- RSpec.describe Async::Reactor do
24
- include_context Async::RSpec::Leaks
23
+ RSpec.describe Async::IO::TCPSocket do
24
+ include_context Async::RSpec::Reactor
25
25
 
26
26
  # Shared port for localhost network tests.
27
27
  let(:server_address) {Async::IO::Address.tcp("localhost", 6788)}
28
28
  let(:data) {"The quick brown fox jumped over the lazy dog."}
29
29
 
30
- around(:each) do |example|
31
- # Accept a single incoming connection and then finish.
32
- subject.async do |task|
33
- Async::IO::Socket.bind(server_address) do |server|
34
- server.listen(10)
35
-
36
- server.accept do |peer, address|
37
- data = peer.read(512)
38
- peer.write(data)
39
- end
40
- end
41
- end
42
-
43
- result = example.run
44
-
45
- if result.is_a? Exception
46
- result
47
- else
48
- subject.run
49
- end
50
- end
51
-
52
30
  describe 'basic tcp server' do
53
31
  it "should start server and send data" do
54
- subject.async do
55
- Async::IO::Socket.connect(server_address) do |client|
56
- client.write(data)
57
- expect(client.read(512)).to be == data
58
- end
59
- end
60
- end
61
- end
62
-
63
- describe 'non-blocking tcp connect' do
64
- it "should start server and send data" do
65
- subject.async do |task|
66
- Async::IO::Socket.connect(server_address) do |client|
67
- client.write(data)
68
- expect(client.read(512)).to be == data
69
- end
70
- end
71
- end
72
-
73
- it "can connect socket and read/write in a different task" do
74
- socket = nil
75
-
76
- subject.async do |task|
77
- socket = Async::IO::Socket.connect(server_address)
32
+ # Accept a single incoming connection and then finish.
33
+ server_task = reactor.async do |task|
34
+ server = Async::IO::TCPServer.new("localhost", 6788)
35
+ peer, address = server.accept
78
36
 
79
- # Stop the reactor once the connection was made.
80
- subject.stop
81
- end
82
-
83
- subject.run
84
-
85
- expect(socket).to_not be_nil
86
- expect(socket).to be_kind_of Async::Wrapper
87
-
88
- subject.async do
89
- socket.write(data)
37
+ data = peer.gets
38
+ peer.puts(data)
90
39
 
91
- expect(socket.read(512)).to be == data
40
+ peer.close
41
+ server.close
92
42
  end
93
43
 
94
- subject.run
44
+ client = Async::IO::TCPSocket.new("localhost", 6788)
95
45
 
96
- socket.close
97
- end
98
-
99
- it "can't use a socket in nested tasks" do
100
- subject.async do |task|
101
- socket = Async::IO::Socket.connect(server_address)
102
- expect(socket).to be_kind_of Async::Wrapper
103
-
104
- expect do
105
- subject.async do
106
- socket.write(data)
107
- # expect(socket.read(512)).to be == data
108
- end
109
- end.to_not raise_error
110
-
111
- socket.close
112
- end
46
+ client.puts(data)
47
+ expect(client.gets).to be == data
48
+
49
+ client.close
50
+ server_task.wait
113
51
  end
114
52
  end
115
53
  end
@@ -20,54 +20,33 @@
20
20
 
21
21
  require 'async/io/udp_socket'
22
22
 
23
- RSpec.describe Async::Reactor do
24
- include_context Async::RSpec::Leaks
23
+ RSpec.describe Async::IO::UDPSocket do
24
+ include_context Async::RSpec::Reactor
25
25
 
26
- # Shared port for localhost network tests.
27
- let(:server_address) {Async::IO::Address.udp("127.0.0.1", 6778)}
28
26
  let(:data) {"The quick brown fox jumped over the lazy dog."}
29
27
 
30
28
  describe 'basic udp server' do
31
29
  it "should echo data back to peer" do
32
- subject.async do
33
- Async::IO::Socket.bind(server_address) do |server|
34
- packet, address = server.recvfrom(512)
35
-
36
- server.send(packet, 0, address)
37
- end
30
+ reactor.async do
31
+ server = Async::IO::UDPSocket.new(Socket::AF_INET)
32
+ server.bind("127.0.0.1", 6778)
33
+
34
+ packet, address = server.recvfrom(512)
35
+ server.send(packet, 0, address[3], address[1])
36
+
37
+ server.close
38
38
  end
39
39
 
40
- subject.async do
41
- Async::IO::Socket.connect(server_address) do |client|
42
- client.send(data)
43
- response = client.recv(512)
44
-
45
- expect(response).to be == data
46
- end
40
+ reactor.async do
41
+ client = Async::IO::UDPSocket.new(Socket::AF_INET)
42
+ client.connect("127.0.0.1", 6778)
43
+
44
+ client.send(data, 0)
45
+ response = client.recv(512)
46
+ client.close
47
+
48
+ expect(response).to be == data
47
49
  end
48
-
49
- subject.run
50
- end
51
-
52
- it "should use unconnected socket" do
53
- subject.async do
54
- Async::IO::Socket.bind(server_address) do |server|
55
- packet, address = server.recvfrom(512)
56
-
57
- server.send(packet, 0, address)
58
- end
59
- end
60
-
61
- subject.async do
62
- Async::IO::UDPSocket.wrap(server_address.afamily) do |client|
63
- client.send(data, 0, server_address)
64
- response, address = client.recvfrom(512)
65
-
66
- expect(response).to be == data
67
- end
68
- end
69
-
70
- subject.run
71
50
  end
72
51
  end
73
52
  end
@@ -30,6 +30,10 @@ RSpec.describe Async::Reactor do
30
30
  FileUtils.rm_f path
31
31
  end
32
32
 
33
+ after do
34
+ FileUtils.rm_f path
35
+ end
36
+
33
37
  describe 'basic unix socket' do
34
38
  it "should echo data back to peer" do
35
39
  subject.async do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2018-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: async-rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +115,8 @@ files:
115
115
  - spec/async/io/generic_spec.rb
116
116
  - spec/async/io/notification_spec.rb
117
117
  - spec/async/io/protocol/line_spec.rb
118
+ - spec/async/io/socket/tcp_spec.rb
119
+ - spec/async/io/socket/udp_spec.rb
118
120
  - spec/async/io/socket_spec.rb
119
121
  - spec/async/io/ssl_socket_spec.rb
120
122
  - spec/async/io/stream_spec.rb
@@ -154,6 +156,8 @@ test_files:
154
156
  - spec/async/io/generic_spec.rb
155
157
  - spec/async/io/notification_spec.rb
156
158
  - spec/async/io/protocol/line_spec.rb
159
+ - spec/async/io/socket/tcp_spec.rb
160
+ - spec/async/io/socket/udp_spec.rb
157
161
  - spec/async/io/socket_spec.rb
158
162
  - spec/async/io/ssl_socket_spec.rb
159
163
  - spec/async/io/stream_spec.rb