J0/phoenix_gen_socket_client
63.8
Adequate · 18 September 2026
1.3k
lines of production code
Elixir
with JavaScript
1
measurement over time
What this system is
This system is a retired Elixir library, GenSocketClient, designed to facilitate WebSocket connections for Phoenix Channels. It provides a configurable client implementation that manages persistent connections, handles reconnection logic, and supports JSON serialization via Jason. The project includes a complete example application demonstrating usage and has been updated to align with modern Phoenix and Elixir standards.
Features
Add Phoenix-based example application for GenSocketClient
The example directory now contains a complete Phoenix application that demonstrates how to use the GenSocketClient library. This includes a WebSocket client implementation in \lib/example/socket\_client.ex\ that connects to a local server, handles reconnection, and manages a ping/pong topic. The example also provides the necessary server-side Phoenix channel (\PingChannel\) and socket configuration (\UserSocket\) to facilitate this connection, along with standard Phoenix project structure files like configuration, routing, and static assets.
example · high confidence
Add WebSocket transport with configurable keepalive
The library now supports WebSocket connections via a new \WebSocketClient\ transport module. Users can configure the transport using options such as \keepalive\ (defaulting to 30 seconds to prevent server timeouts), \extra\_headers\, and \ssl\_verify\, which are passed directly to the underlying \websocket\_client\ library. This enables persistent connections with automatic ping/pong handling to maintain connectivity.
_lib/gen\_socket\client/transport · high confidence
Behavioural changes
Configuration updates for Credo integration and environment handling
This change introduces Credo for code style checking by adding a new \config/.credo.exs\ file that defines consistency and readability rules, including environment-specific checks for development and test modes. It also updates \config/config.exs\ to use the \Mix.env()\ function instead of the deprecated \Mix.env\ macro for importing environment-specific configuration files. Additionally, a new \config/docs.exs\ file is added to support documentation generation, and the test configuration is updated to include a configuration entry for \phoenix\_gen\_socket\_client\.
config · high confidence
Library retired and documentation updated for version 4.1.0
The library has been officially retired and is no longer maintained, with no further security fixes or updates planned (as of version 3.2.2). The documentation has been significantly expanded to cover installation, prerequisites, and usage details for the final supported version 4.1.0, which allows passing socket options to the underlying websocket client. The README now includes badges, a detailed usage guide, and references to the MIT license and Travis CI build status.
(repo-wide) · high confidence
Phoenix Channels client library refactored and renamed
The library has been renamed from \Channels.Client\ to \Phoenix.Channels\ and the core socket module has been moved from \lib/socket.ex\ to \lib/gen\_socket\_client.ex\. This change introduces a new \GenSocketClient\ behavior that supports configurable transports, allows passing query parameters during connection initialization, and adds support for synchronous calls and optional terminate callbacks. The previous \TestSocket\ and \WebsocketTransport\ modules have been removed as the new implementation handles transport abstraction differently.
lib · high confidence
Switches JSON serialization from Poison to Jason
The GenSocketClient library now uses the Jason library instead of Poison for encoding and decoding JSON messages. This change updates the internal serializer modules (Json and GzipJson) to call Jason.decode!/1 and Jason.encode/1, which may affect users who relied on Poison-specific error handling or configuration, as the library no longer depends on Poison for JSON processing.
_lib/gen\_socket\client · high confidence
Test coverage
Updated test support infrastructure to use Phoenix 1.3 and Registry; Updated tests for GenSocketClient module and behavior.
Dependencies
Update example project dependencies and main library configuration
The example project now uses Phoenix 1.3, Jason 1.1, and websocket\_client 1.2, replacing the previous local dependency reference with a standard hex dependency for the client library. The main library's mix.exs has been updated to require Elixir 1.8, upgraded to Phoenix 1.3 for tests, replaced the gproc dependency with the standard library's registry (implied by removal and Elixir version), and added Credo, Dialyze, and ExDoc 0.22 for development and documentation.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 64.
Lenses
- Code Health 100
- Architecture 69
- Maturity 53
- Readiness 68
- Security 89
Changes since last survey
- 190 commits — 164 feature/other, 26 fixes
By area
- (root) — 73 commits
- (repo) — 45 commits
- lib/gen_socket_client — 24 commits
- lib/gen_socket_client.ex — 18 commits
- .github/workflows — 11 commits
- example/lib — 5 commits
- config/.credo.exs — 3 commits
- test/socket_client_test.exs — 3 commits
- test/support — 3 commits
- example/mix.exs — 2 commits
- config/test.exs — 1 commit
- example/mix.lock — 1 commit
- example/priv — 1 commit
Notable commits
- fix: Additional fix for Elixir 1.4.0
- fix: Fix call function spec
- fix: Fix disconnect for latest websocket_client
- fix: Fix serializer format to text
- fix: Merge pull request #24 from Aircloak/fix-deps
- fix: Merge pull request #46 from Aircloak/Minor-readme-fixes
- fix: Merge pull request #47 from Aircloak/Minor-pre-release-fixes
- fix: Merge pull request #50 from matt-mazzucato/fix-call-spec
- fix: Merge pull request #6 from Aircloak/sasa/fix-typespec
- fix: Merge pull request #66 from Hannes-Steffenhagen-bd/fix/refs-ought-to-be-strings
- fix: Merge pull request #7 from Aircloak/sasa/fix-typespec
- fix: chore: attempt to fix files
- fix: fix alias credo warnings
- fix: fix doc capitalization
- fix: fix local example
- fix: fix typespec
- fix: fix typespecs
- fix: fix warning
- fix: fix: add rebar3
- fix: fix: add rebar3 version
- …and 170 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
J0/phoenix_gen_socket_client 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 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 9d59e142ff2f51c7a150f4f54c8ae6c3a4ac76df — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.