npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pixotope/zmq-client

v0.10.0

Published

ZMQ-over-WebSocket pub/sub client for Pixotope Foundation

Downloads

1,275

Readme

@pixotope/zmq-client

ZMQ-over-WebSocket pub/sub client for talking to a Pixotope/Disguise DataHub-style backend.

Install

pnpm add @pixotope/zmq-client

This package depends on @pixotope/utils internally (for shared DataHub-related types). It's resolved automatically as part of installation - you don't need to install or think about it yourself.

Quick start

@pixotope/zmq-client doesn't open the socket connection itself - hand it a connected socket.io-client Socket (e.g. via @pixotope/socket.io-client), and it takes care of mapping get/call/update/set/subscribe/mirror requests onto socket events and routing responses back to your callbacks.

import { io } from "socket.io-client";
import {
  ZMQWebSocketClient,
  ZMQProxyWSClient,
  DEFAULT_PROXY_WS_ENDPOINTS,
} from "@pixotope/zmq-client";

const socket = io("https://example.com");

// The low-level ZMQClient implementation, bound to a socket and an event-name mapping.
const client = new ZMQWebSocketClient(socket, DEFAULT_PROXY_WS_ENDPOINTS);

// A higher-level wrapper that generates request IDs for you and returns
// `[unsubscribe, id]` tuples for long-lived requests.
const proxy = new ZMQProxyWSClient(client);

// Publish a raw message on a topic.
client.send("some/topic", { hello: "world" });

// Fetch the current value of a property once.
proxy.get({
  service: "MyService",
  name: "SomeProperty",
  callback: (value) => console.log(value),
});

// Invoke a remote method and await its result.
const result = await proxy.callAsync({
  service: "MyService",
  functionName: "DoSomething",
  parameters: { foo: "bar" },
});

// Subscribe to changes on a property. Returns a tuple of [unsubscribe, id].
const [unsubscribe] = proxy.subscribe({
  service: "MyService",
  name: "SomeProperty",
  callback: (data) => console.log(data.message.Value),
});

// Later, stop listening.
unsubscribe();

API overview

  • ZMQClient - the interface describing the low-level pub/sub + get/call/update/set/subscribe/mirror operations, along with its ZMQClient namespace of option types (Get, Call, Update, Set, Subscribe, Mirror).
  • ZMQWebSocketClient - the default ZMQClient implementation, backed by a socket.io-client Socket.
  • ZMQProxyWSClient - a higher-level wrapper around a ZMQClient that generates request IDs for you and returns [unsubscribe, id] tuples for cancelable/long-lived requests.
  • TEndpointsConfig / DEFAULT_PROXY_WS_ENDPOINTS - the event-name mapping used to carry each operation over the socket, and the default mapping for the standard Pixotope ZMQ-over-WebSocket proxy server.

See the generated API reference (pnpm typedoc) for full type signatures.