• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zeromq / libzmq
75%

Build:
DEFAULT BRANCH: master
Repo Added 13 Mar 2016 10:54PM UTC
Files 214
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • add-unittests-mtrie
  • ci
  • dev1
  • fix-install-cmake-config-on-mingw
  • fix_ctx_get
  • jemc-relicense
  • latest_release
  • libera
  • make-failing-test-not-hang
  • master
  • no-allocation-sends
  • p-stable-poller
  • patch-1
  • pre_reformat
  • refs/tags/v4.3.5
  • revert-1975-master
  • revert-2572-rep_leak
  • revert-2974-static_init_gcc
  • rp42-fix-windows-mt-build
  • secpolicy
  • show-ref
  • tmp_obs_release_branch
  • v4.0.2-test
  • v4.2.0
  • v4.2.0-rc1
  • v4.2.1
  • v4.2.2
  • v4.2.3
  • v4.2.4
  • v4.2.5
  • v4.3.0
  • v4.3.1
  • v4.3.2
  • v4.3.2-win
  • v4.3.3
  • v4.3.4
  • vsock
  • zap-domain-docs

10 Jan 2026 06:27PM UTC coverage: 74.971% (+0.02%) from 74.947%
20882548110

push

github

bluca
problem: no API to disconnect a specific peer by routing id

Background: JeroMQ added disconnectPeer(routingId) to allow dropping a single peer connection. In libzmq there was no C API to disconnect a single connection by its routing id; applications had to tear down entire endpoints or sockets. This also created divergence between JeroMQ and libzmq for the PEER/SERVER patterns.

solution: introduce a virtual xdisconnect_peer on socket_base_t and a public socket_base_t::disconnect_peer that delegates to it. Implement xdisconnect_peer in server_t to look up the outbound pipe by routing id and terminate it, which removes it from bookkeeping via xpipe_terminated. Expose a new DRAFT C API zmq_disconnect_peer(void*, uint32_t) that always calls socket_base_t::disconnect_peer (matching JeroMQ pattern of calling the socket regardless of type); unsupported types return ENOTSUP. This brings libzmq to feature parity with JeroMQ’s commit 57de9b8 (Peer support disconnect).

API: add draft function zmq_disconnect_peer(void *socket, uint32_t routing_id). For ZMQ_SERVER and ZMQ_PEER this disconnects that specific connection; subsequent sends to that routing id fail with EHOSTUNREACH until a new connection is formed. Other socket types return ENOTSUP. The method is thread-safe when using thread-safe sockets.

Tests: add tests/test_peer_disconnect.cpp which creates two ZMQ_PEER sockets, exchanges a message to learn the remote routing id, calls zmq_disconnect_peer on the bound side, and verifies sending back fails with EHOSTUNREACH. Hook the test into Makefile.am under ENABLE_DRAFTS.

Docs: add doc/zmq_disconnect_peer.adoc manpage; link it from doc/zmq_socket.adoc; include it in doc/Makefile.am MAN3 so it is built and installed. Note the draft status (requires --enable-drafts).

Implementation notes: the server_t override simply terminates the matched pipe; removal from maps happens in xpipe_terminated. The C shim intentionally does not gate by socket type and relies on... (continued)

14842 of 19797 relevant lines covered (74.97%)

31518.59 hits per line

Relevant lines Covered
Build:
Build:
19797 RELEVANT LINES 14842 COVERED LINES
31518.59 HITS PER LINE
Source Files on master
  • Tree
  • List 214
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
20882548110 master problem: no API to disconnect a specific peer by routing id Background: JeroMQ added disconnectPeer(routingId) to allow dropping a single peer connection. In libzmq there was no C API to disconnect a single connection by its routing id; applicati... push 10 Jan 2026 06:31PM UTC bluca github
74.97
20881274427 master Merge 1610d2112 into 7a7bfa10e Pull #4829 10 Jan 2026 04:44PM UTC web-flow github
74.94
20877294050 master Merge ced8e6907 into 7a7bfa10e Pull #4829 10 Jan 2026 11:03AM UTC web-flow github
74.94
20876470464 master Merge c6b9c2c7c into 7a7bfa10e Pull #4829 10 Jan 2026 09:47AM UTC web-flow github
74.98
19275258115 no-allocation-sends Merge 04d5656ec into 7a7bfa10e Pull #4802 11 Nov 2025 06:43PM UTC web-flow github
74.94
19264016350 master Merge ee179a0bd into 7a7bfa10e Pull #4823 11 Nov 2025 11:25AM UTC web-flow github
74.96
18938391176 vsock Merge 2c1d88c3f into 7a7bfa10e Pull #4822 30 Oct 2025 11:07AM UTC web-flow github
73.94
18938348005 vsock Merge b1d9fe936 into 7a7bfa10e Pull #4822 30 Oct 2025 11:04AM UTC web-flow github
73.95
18938276016 vsock Merge aedab342b into 7a7bfa10e Pull #4822 30 Oct 2025 10:59AM UTC web-flow github
73.95
18937972569 vsock Merge fc7923ef1 into 7a7bfa10e Pull #4822 30 Oct 2025 10:49AM UTC web-flow github
73.95
See All Builds (3860)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc