OMQ::CHANNEL

CI Gem Version License: ISC Ruby

CHANNEL socket type (RFC 52) for OMQ.

Single-frame, bidirectional, exclusive pair. Like PAIR but restricted to single-frame messages (draft socket).

Usage

require "omq"
require "omq/rfc/channel"

ch1 = OMQ::CHANNEL.bind("tcp://127.0.0.1:5555")
ch2 = OMQ::CHANNEL.connect("tcp://127.0.0.1:5555")

ch1 << "ping"
ch2.receive  # => "ping"
ch2 << "pong"
ch1.receive  # => "pong"

Installation

gem "omq-rfc-channel"

Requires omq >= 0.12.

License

ISC