omq 0.26.2 → 0.28.1

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.
@@ -6,16 +6,18 @@ require_relative "inproc/pipe"
6
6
 
7
7
  module OMQ
8
8
  module Transport
9
- # In-process transport.
9
+ # Ruby in-process transport (ruby:// scheme).
10
10
  #
11
- # Both peers are Ruby backend sockets in the same process (native
12
- # ZMQ's inproc registry is separate and unreachable). Messages are
13
- # transferred as Ruby arrays — no ZMTP framing, no byte
11
+ # Both peers are Ruby backend sockets in the same process. Messages
12
+ # are transferred as Ruby arrays no ZMTP framing, no byte
14
13
  # serialization. Parts are already frozen by Writable#send, so the
15
14
  # receiver sees the same immutable contract as ZMTP transports.
16
15
  #
16
+ # The inproc:// scheme is reserved for native backends (FFI/libzmq,
17
+ # Rust/omq-tokio) which have their own in-process registries.
18
+ #
17
19
  module Inproc
18
- Engine.transports["inproc"] = self
20
+ Engine.transports["ruby"] = self
19
21
 
20
22
 
21
23
  # Socket types that exchange commands (SUBSCRIBE/CANCEL) over inproc.
@@ -38,7 +40,7 @@ module OMQ
38
40
 
39
41
  # Creates a bound inproc listener.
40
42
  #
41
- # @param endpoint [String] e.g. "inproc://my-endpoint"
43
+ # @param endpoint [String] e.g. "ruby://my-endpoint"
42
44
  # @param engine [Engine] the owning engine
43
45
  # @return [Listener]
44
46
  # @raise [ArgumentError] if endpoint is already bound
@@ -61,7 +63,7 @@ module OMQ
61
63
 
62
64
  # Connects to a bound inproc endpoint.
63
65
  #
64
- # @param endpoint [String] e.g. "inproc://my-endpoint"
66
+ # @param endpoint [String] e.g. "ruby://my-endpoint"
65
67
  # @param engine [Engine] the connecting engine
66
68
  # @return [void]
67
69
  #
@@ -15,6 +15,15 @@ module OMQ
15
15
 
16
16
 
17
17
  class << self
18
+ # ZMTP connection class used for IPC-accepted/dialed peers.
19
+ #
20
+ # @return [Class]
21
+ #
22
+ def connection_class
23
+ Protocol::ZMTP::Connection
24
+ end
25
+
26
+
18
27
  # Creates a bound IPC listener.
19
28
  #
20
29
  # @param endpoint [String] e.g. "ipc:///tmp/my.sock" or "ipc://@abstract"
@@ -13,6 +13,15 @@ module OMQ
13
13
 
14
14
 
15
15
  class << self
16
+ # ZMTP connection class used for TCP-accepted/dialed peers.
17
+ #
18
+ # @return [Class]
19
+ #
20
+ def connection_class
21
+ Protocol::ZMTP::Connection
22
+ end
23
+
24
+
16
25
  # Creates a bound TCP listener.
17
26
  #
18
27
  # @param endpoint [String] e.g. "tcp://127.0.0.1:5555" or "tcp://*:0"
data/lib/omq/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OMQ
4
- VERSION = "0.26.2"
4
+ VERSION = "0.28.1"
5
5
  end
data/lib/omq.rb CHANGED
@@ -7,6 +7,7 @@ require "io/stream"
7
7
  # Core
8
8
  require_relative "omq/version"
9
9
  require_relative "omq/constants"
10
+ require_relative "omq/backend"
10
11
  require_relative "omq/reactor"
11
12
  require_relative "omq/options"
12
13
  require_relative "omq/routing"
@@ -24,6 +25,7 @@ require_relative "omq/routing/xsub"
24
25
  require_relative "omq/routing/push"
25
26
  require_relative "omq/routing/pull"
26
27
  require_relative "omq/engine"
28
+ OMQ::Backend.register(:ruby, OMQ::Engine)
27
29
 
28
30
  # Transport
29
31
  require_relative "omq/transport/inproc"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.2
4
+ version: 0.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.8'
18
+ version: '0.10'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0.8'
25
+ version: '0.10'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: async
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -65,6 +65,7 @@ files:
65
65
  - LICENSE
66
66
  - README.md
67
67
  - lib/omq.rb
68
+ - lib/omq/backend.rb
68
69
  - lib/omq/channel.rb
69
70
  - lib/omq/client_server.rb
70
71
  - lib/omq/constants.rb
@@ -76,9 +77,6 @@ files:
76
77
  - lib/omq/engine/reconnect.rb
77
78
  - lib/omq/engine/recv_pump.rb
78
79
  - lib/omq/engine/socket_lifecycle.rb
79
- - lib/omq/ffi.rb
80
- - lib/omq/ffi/engine.rb
81
- - lib/omq/ffi/libzmq.rb
82
80
  - lib/omq/options.rb
83
81
  - lib/omq/pair.rb
84
82
  - lib/omq/peer.rb
@@ -123,7 +121,7 @@ files:
123
121
  - lib/omq/transport/udp.rb
124
122
  - lib/omq/version.rb
125
123
  - lib/omq/writable.rb
126
- homepage: https://github.com/zeromq/omq
124
+ homepage: https://github.com/zeromq/omq.rb
127
125
  licenses:
128
126
  - ISC
129
127
  metadata: {}
@@ -141,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
139
  - !ruby/object:Gem::Version
142
140
  version: '0'
143
141
  requirements: []
144
- rubygems_version: 4.0.6
142
+ rubygems_version: 4.0.16
145
143
  specification_version: 4
146
144
  summary: Pure Ruby ZMQ library
147
145
  test_files: []