Module: Protocol::SP::Protocols
- Defined in:
- lib/protocol/sp/protocols.rb
Overview
Wire-level protocol identifiers (16-bit, big-endian on the wire).
Encoding: ‘(major << 4) | minor`, matching nng’s ‘NNI_PROTO(major, minor)` macro in `src/core/protocol.h`. Sourced from `src/sp/protocol/*/`.
Constant Summary collapse
- PAIR_V0 =
(1, 0)
0x10- PAIR_V1 =
(1, 1)
0x11- PUB_V0 =
(2, 0)
0x20- SUB_V0 =
(2, 1)
0x21- REQ_V0 =
(3, 0)
0x30- REP_V0 =
(3, 1)
0x31- PUSH_V0 =
(5, 0)
0x50- PULL_V0 =
(5, 1)
0x51- SURVEYOR_V0 =
(6, 2)
0x62- RESPONDENT_V0 =
(6, 3)
0x63- BUS_V0 =
(7, 0)
0x70- VALID_PEERS =
Compatibility table: which peer ID is acceptable for each self ID.
{ PAIR_V0 => [PAIR_V0].freeze, PAIR_V1 => [PAIR_V1].freeze, PUB_V0 => [SUB_V0].freeze, SUB_V0 => [PUB_V0].freeze, REQ_V0 => [REP_V0].freeze, REP_V0 => [REQ_V0].freeze, PUSH_V0 => [PULL_V0].freeze, PULL_V0 => [PUSH_V0].freeze, SURVEYOR_V0 => [RESPONDENT_V0].freeze, RESPONDENT_V0 => [SURVEYOR_V0].freeze, BUS_V0 => [BUS_V0].freeze, }.freeze
- NAMES =
{ PAIR_V0 => "pair", PAIR_V1 => "pair1", PUB_V0 => "pub", SUB_V0 => "sub", REQ_V0 => "req", REP_V0 => "rep", PUSH_V0 => "push", PULL_V0 => "pull", SURVEYOR_V0 => "surveyor", RESPONDENT_V0 => "respondent", BUS_V0 => "bus", }.freeze