Skip to content
CAI
Software that uses CAICheck a score

emqx/esockd

71.2

Strong · 15 November 2026

6.9k

lines of production code

Erlang

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added demo SSL certificate and private key for local development

A self-signed SSL certificate (demo.crt) and its corresponding RSA private key (demo.key) have been added to the priv directory. These files provide the necessary credentials for local development and testing of HTTPS/TLS connections, allowing users to run the application securely without needing external certificate authorities.

priv · high confidence

Introduction of UDP Proxy with connection lifecycle management

This change introduces the UDP proxy component, which converts UDP connections into long-lived connections within the application. It includes a PlantUML diagram documenting the proxy's behavior for handling multiple clients and load balancers, an ETS-based database (\esockd\_udp\_proxy\_db\) to track and manage connection attachments and detachments, and a connection abstraction module (\esockd\_udp\_proxy\_connection\) that standardizes callbacks for initializing, finding, dispatching, and closing connections.

_src/udp\proxy · high confidence

New example applications for TCP, UDP, DTLS, and Proxy Protocol

The examples directory now includes a comprehensive set of reference implementations demonstrating esockd capabilities. These include a simple TCP echo server, a gen\_server-based TCP echo server, and a plain TCP echo server. New examples cover UDP echo servers and DTLS echo servers (including PSK-based DTLS). The suite also features an async\_recv echo server, a benchmark for active\_n vs async\_recv, and a TCP window full test to illustrate send behavior. Additionally, a Proxy Protocol example is provided, showing integration with HAProxy using V2 protocol support.

examples · high confidence

esockd 5.9.9 release with hot-upgrade support and new socket-based acceptor

This release introduces a new socket-based acceptor implementation (esockd\_accept\_socket) alongside the existing inet-based one, enabling more flexible socket tuning and faster connection closure. It also adds comprehensive hot-upgrade instructions (appup) for versions 5.9.0 through 5.9.9, allowing seamless updates without downtime. The release includes fixes for UDP/DTLS listeners, improved proxy protocol handling, and better compatibility with recent OTP versions.

src · high confidence

Behavioural changes

New include headers defining proxy protocol fields and connection types

The library introduces two new header files, \esockd.hrl\ and \esockd\_proxy.hrl\, to standardize internal data structures and type definitions. \esockd.hrl\ defines the \proxy\_socket\ record, which now includes support for Proxy Protocol v2 additional fields (such as SSL client certificate details, ALPN, and authority), and introduces OTP 26 compatibility for SSL options. \esockd\_proxy.hrl\ establishes the core type definitions for the proxy subsystem, including \proxy\_transport\, \connection\_id\, and \proxy\_options\, facilitating the new proxy-based connection architecture.

include · high confidence

esockd rebrands to EMQX and updates licensing

The project has been renamed from esockd to EMQX, as reflected in the updated README and repository context. The software license has been changed from MIT to Apache License 2.0. Additionally, the build configuration now enforces a minimum Erlang/OTP version of 21.0 and includes a .tool-versions file specifying Erlang 28.1-1.

(repo-wide) · high confidence

Test coverage

Expanded test coverage for esockd core components and transport features; Updated test certificates for esockd.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 71 (+3.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 74 → 72 (-1.5)
  • Architecture 88 → 100 (+11.9)
  • Maturity 66 → 66 (+0.1)
  • Readiness 62 → 70 (+8.6)
  • Security 74 → 80 (+6.0)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (8)

  • Hotspot: src/esockd_acceptor_fsm.erl (src/esockd_acceptor_fsm.erl)
  • Leaked secret: private-key (priv/demo.key)
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion
  • Rotate the exposed credentials — git history can't be un-committed
  • Secret: private-key (examples/async_recv/crt/demo.key)
  • Secret: private-key (examples/dtls/crt/demo.key)
  • Secret: private-key (priv/demo.key)

New (14)

  • Edited copies of one member (3 members, 10+ corresponding lines) (src/esockd_sup.erl)
  • Edited copies of one member (3 members, 11+ corresponding lines) (examples/simple/simple_echo_server.erl)
  • Edited copy of a member (13 corresponding lines) (examples/dtls/dtls_echo_server.erl)
  • Edited copy of a member (14 corresponding lines) (src/esockd_socket.erl)
  • Edited copy of a member (15 corresponding lines) (src/esockd_transport.erl)
  • Edited copy of a member (17 corresponding lines) (examples/gen_server/gen_echo_server.erl)
  • Edited copy of a member (17 corresponding lines) (src/esockd_dtls_listener.erl)
  • Edited copy of a member (25 corresponding lines) (src/esockd_listener.erl)
  • Edited copy of a member (3 corresponding lines) (src/esockd_limiter.erl)
  • Edited copy of a member (4 corresponding lines) (src/esockd_acceptor_fsm.erl)
  • Edited copy of a member (4 corresponding lines) (src/esockd_cidr.erl)
  • Edited copy of a member (4 corresponding lines) (src/esockd_dtls_listener.erl)
  • Edited copy of a member (8 corresponding lines) (examples/gen_server/gen_echo_server.erl)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 6 commits — 2 feature/other, 4 fixes

By area

  • (repo) — 3 commits
  • src/esockd.app.src — 1 commit
  • src/esockd_transport.erl — 1 commit
  • test/esockd_acceptor_fsm_SUITE.erl — 1 commit

Notable commits

  • fix: Merge pull request #239 from zmstone/261105-fix-flaky-t-rate-limitted
  • fix: Merge pull request #240 from terry-xiaoyu/fix/otp28-gc-after-handshake
  • fix: fix(ssl): refuse a TLS handshake when the listener supervisor is backlogged
  • fix: fix(transport): gc TLS workers after handshake on OTP 28
  • change: Merge pull request #238 from zmstone/261105-refuse-tls-handshake-when-backlogged
  • change: test(acceptor): do not require close notifications in connect order

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

emqx/esockd was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 051b65a70223505e55e5a71c45d5c3c4a56f55df — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.