nio4r 2.5.9 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.mailmap +16 -0
- data/Gemfile +4 -2
- data/{CHANGES.md → changes.md} +18 -0
- data/examples/echo_server.rb +7 -0
- data/ext/nio4r/bytebuffer.c +75 -38
- data/ext/nio4r/extconf.rb +15 -0
- data/ext/nio4r/monitor.c +47 -22
- data/ext/nio4r/nio4r.h +1 -5
- data/ext/nio4r/selector.c +43 -18
- data/lib/nio/bytebuffer.rb +6 -0
- data/lib/nio/monitor.rb +7 -0
- data/lib/nio/selector.rb +15 -0
- data/lib/nio/version.rb +6 -1
- data/lib/nio.rb +9 -0
- data/lib/nio4r.rb +5 -0
- data/license.md +50 -39
- data/nio4r.gemspec +4 -3
- data/readme.md +91 -0
- data/spec/nio/acceptables_spec.rb +4 -0
- data/spec/nio/bytebuffer_spec.rb +6 -0
- data/spec/nio/monitor_spec.rb +7 -0
- data/spec/nio/selectables/pipe_spec.rb +6 -0
- data/spec/nio/selectables/ssl_socket_spec.rb +7 -0
- data/spec/nio/selectables/tcp_socket_spec.rb +7 -0
- data/spec/nio/selectables/udp_socket_spec.rb +7 -0
- data/spec/nio/selector_spec.rb +12 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/support/selectable_examples.rb +8 -0
- metadata +12 -9
- data/README.md +0 -99
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nio4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -49,12 +49,12 @@ extra_rdoc_files: []
|
|
49
49
|
files:
|
50
50
|
- ".github/workflows/workflow.yml"
|
51
51
|
- ".gitignore"
|
52
|
+
- ".mailmap"
|
52
53
|
- ".rspec"
|
53
54
|
- ".rubocop.yml"
|
54
|
-
- CHANGES.md
|
55
55
|
- Gemfile
|
56
|
-
- README.md
|
57
56
|
- Rakefile
|
57
|
+
- changes.md
|
58
58
|
- examples/echo_server.rb
|
59
59
|
- ext/libev/Changes
|
60
60
|
- ext/libev/LICENSE
|
@@ -88,12 +88,14 @@ files:
|
|
88
88
|
- lib/nio/monitor.rb
|
89
89
|
- lib/nio/selector.rb
|
90
90
|
- lib/nio/version.rb
|
91
|
+
- lib/nio4r.rb
|
91
92
|
- license.md
|
92
93
|
- logo.png
|
93
94
|
- nio4r.gemspec
|
94
95
|
- rakelib/extension.rake
|
95
96
|
- rakelib/rspec.rake
|
96
97
|
- rakelib/rubocop.rake
|
98
|
+
- readme.md
|
97
99
|
- spec/nio/acceptables_spec.rb
|
98
100
|
- spec/nio/bytebuffer_spec.rb
|
99
101
|
- spec/nio/monitor_spec.rb
|
@@ -106,13 +108,14 @@ files:
|
|
106
108
|
- spec/support/selectable_examples.rb
|
107
109
|
homepage: https://github.com/socketry/nio4r
|
108
110
|
licenses:
|
109
|
-
- MIT
|
111
|
+
- MIT AND (BSD-2-Clause OR GPL-2.0-or-later)
|
110
112
|
metadata:
|
111
113
|
bug_tracker_uri: https://github.com/socketry/nio4r/issues
|
112
|
-
changelog_uri: https://github.com/socketry/nio4r/blob/
|
113
|
-
documentation_uri: https://www.rubydoc.info/gems/nio4r/2.
|
114
|
-
source_code_uri: https://github.com/socketry/nio4r/tree/v2.
|
114
|
+
changelog_uri: https://github.com/socketry/nio4r/blob/main/changes.md
|
115
|
+
documentation_uri: https://www.rubydoc.info/gems/nio4r/2.6.1
|
116
|
+
source_code_uri: https://github.com/socketry/nio4r/tree/v2.6.1
|
115
117
|
wiki_uri: https://github.com/socketry/nio4r/wiki
|
118
|
+
funding_uri: https://github.com/sponsors/ioquatix/
|
116
119
|
post_install_message:
|
117
120
|
rdoc_options: []
|
118
121
|
require_paths:
|
@@ -128,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
131
|
- !ruby/object:Gem::Version
|
129
132
|
version: '0'
|
130
133
|
requirements: []
|
131
|
-
rubygems_version: 3.4.
|
134
|
+
rubygems_version: 3.4.22
|
132
135
|
signing_key:
|
133
136
|
specification_version: 4
|
134
137
|
summary: New IO for Ruby
|
data/README.md
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
# ![nio4r](https://raw.github.com/socketry/nio4r/master/logo.png)
|
2
|
-
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/nio4r.svg)](http://rubygems.org/gems/nio4r)
|
4
|
-
[![Build Status](https://github.com/socketry/nio4r/workflows/nio4r/badge.svg?branch=master&event=push)](https://github.com/socketry/nio4r/actions?query=workflow:nio4r)
|
5
|
-
[![Code Climate](https://codeclimate.com/github/socketry/nio4r.svg)](https://codeclimate.com/github/socketry/nio4r)
|
6
|
-
[![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/gems/nio4r/2.2.0)
|
7
|
-
|
8
|
-
**New I/O for Ruby (nio4r)**: cross-platform asynchronous I/O primitives for
|
9
|
-
scalable network clients and servers. Modeled after the Java NIO API, but
|
10
|
-
simplified for ease-of-use.
|
11
|
-
|
12
|
-
**nio4r** provides an abstract, cross-platform stateful I/O selector API for Ruby.
|
13
|
-
I/O selectors are the heart of "reactor"-based event loops, and monitor
|
14
|
-
multiple I/O objects for various types of readiness, e.g. ready for reading or
|
15
|
-
writing.
|
16
|
-
|
17
|
-
## Projects using nio4r
|
18
|
-
|
19
|
-
* [ActionCable]: Rails 5 WebSocket protocol, uses nio4r for a WebSocket server
|
20
|
-
* [Celluloid]: Actor-based concurrency framework, uses nio4r for async I/O
|
21
|
-
* [Async]: Asynchronous I/O framework for Ruby
|
22
|
-
* [Puma]: Ruby/Rack web server built for concurrency
|
23
|
-
|
24
|
-
[ActionCable]: https://rubygems.org/gems/actioncable
|
25
|
-
[Celluloid]: https://github.com/celluloid/celluloid-io
|
26
|
-
[Async]: https://github.com/socketry/async
|
27
|
-
[Puma]: https://github.com/puma/puma
|
28
|
-
|
29
|
-
## Goals
|
30
|
-
|
31
|
-
* Expose high-level interfaces for stateful IO selectors
|
32
|
-
* Keep the API small to maximize both portability and performance across many
|
33
|
-
different OSes and Ruby VMs
|
34
|
-
* Provide inherently thread-safe facilities for working with IO objects
|
35
|
-
|
36
|
-
## Supported platforms
|
37
|
-
|
38
|
-
* Ruby 2.4
|
39
|
-
* Ruby 2.5
|
40
|
-
* Ruby 2.6
|
41
|
-
* Ruby 2.7
|
42
|
-
* Ruby 3.0
|
43
|
-
* [JRuby](https://github.com/jruby/jruby)
|
44
|
-
* [TruffleRuby](https://github.com/oracle/truffleruby)
|
45
|
-
|
46
|
-
## Supported backends
|
47
|
-
|
48
|
-
* **libev**: MRI C extension targeting multiple native IO selector APIs (e.g epoll, kqueue)
|
49
|
-
* **Java NIO**: JRuby extension which wraps the Java NIO subsystem
|
50
|
-
* **Pure Ruby**: `Kernel.select`-based backend that should work on any Ruby interpreter
|
51
|
-
|
52
|
-
## Documentation
|
53
|
-
|
54
|
-
[Please see the nio4r wiki](https://github.com/socketry/nio4r/wiki)
|
55
|
-
for more detailed documentation and usage notes:
|
56
|
-
|
57
|
-
* [Getting Started]: Introduction to nio4r's components
|
58
|
-
* [Selectors]: monitor multiple `IO` objects for readiness events
|
59
|
-
* [Monitors]: control interests and inspect readiness for specific `IO` objects
|
60
|
-
* [Byte Buffers]: fixed-size native buffers for high-performance I/O
|
61
|
-
|
62
|
-
[Getting Started]: https://github.com/socketry/nio4r/wiki/Getting-Started
|
63
|
-
[Selectors]: https://github.com/socketry/nio4r/wiki/Selectors
|
64
|
-
[Monitors]: https://github.com/socketry/nio4r/wiki/Monitors
|
65
|
-
[Byte Buffers]: https://github.com/socketry/nio4r/wiki/Byte-Buffers
|
66
|
-
|
67
|
-
See also:
|
68
|
-
|
69
|
-
* [YARD API documentation](http://www.rubydoc.info/gems/nio4r/frames)
|
70
|
-
|
71
|
-
## Non-goals
|
72
|
-
|
73
|
-
**nio4r** is not a full-featured event framework like [EventMachine] or [Cool.io].
|
74
|
-
Instead, nio4r is the sort of thing you might write a library like that on
|
75
|
-
top of. nio4r provides a minimal API such that individual Ruby implementers
|
76
|
-
may choose to produce optimized versions for their platform, without having
|
77
|
-
to maintain a large codebase.
|
78
|
-
|
79
|
-
[EventMachine]: https://github.com/eventmachine/eventmachine
|
80
|
-
[Cool.io]: https://coolio.github.io/
|
81
|
-
|
82
|
-
## Releases
|
83
|
-
|
84
|
-
### CRuby
|
85
|
-
|
86
|
-
```
|
87
|
-
rake clean
|
88
|
-
rake release
|
89
|
-
```
|
90
|
-
|
91
|
-
### JRuby
|
92
|
-
|
93
|
-
You might need to delete `Gemfile.lock` before trying to `bundle install`.
|
94
|
-
|
95
|
-
```
|
96
|
-
rake clean
|
97
|
-
rake compile
|
98
|
-
rake release
|
99
|
-
```
|