Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Socket Client Laravel Package

react/socket-client

Async, event-driven TCP/IP socket client for ReactPHP. Provides promise-based connectors for plain TCP, secure TLS, and Unix domain sockets, plus DNS resolution, connection timeouts, and a flexible ConnectorInterface for custom transports.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for outbound TCP/TLS connectivity: if your Laravel app needs to speak a raw socket protocol (SMTP relays, custom binary APIs, Redis/MySQL wire protocols, IoT device handshakes, WHOIS, telnet-style admin interfaces), this package answers "do we write our own non-blocking socket layer?" — the answer is no, you use a ReactPHP socket component.
  • Async vs. synchronous architecture: it forces the roadmap question of whether a feature can afford to block a PHP-FPM worker. Long-lived connections, streaming responses, and connection-pool-style workloads are the use cases that justify an event-loop-based service (Laravel Octane, react/event-loop, or a standalone daemon) rather than a queue job.
  • TLS posture and compliance: the SecureConnector half of this package is where you decide on certificate verification defaults, SNI handling, and timeouts — a decision that touches security review, not just engineering.
  • Feature scoping for "real-time" asks: when a stakeholder asks for live data, streaming, or push, this package is the primitive that determines whether the answer is "webhooks + polling" or "persistent connection service." That is a staffing and infrastructure decision, not just a library pick.
  • Vendor/legacy risk accounting: with zero dependents and a 2017 final release, adopting it is a knowingly-taken maintenance liability. That's a roadmap input, not just a technical one.

Caveat that should frame every one of the above: this package is archived and superseded. react/socket-client was merged into react/socket, which is the actively maintained home for both client and server sockets. Any decision "supported" by this package should be re-run against react/socket before it reaches a plan.

When to Consider This Package

Consider it only in these narrow situations:

  • You are maintaining an existing codebase that already depends on it, and you need to understand behavior before a migration. In that case, treat it as a stable, frozen artifact — MIT-licensed, small surface area, unlikely to change under you.
  • You need a reference implementation or a minimal read of how ReactPHP structures ConnectorInterface, TcpConnector, and SecureConnector — the code is a clean teaching artifact.
  • You are pinned to a legacy dependency graph where a transitive package still requires react/socket-client and upgrading the whole tree is out of scope for the current cycle.

Look elsewhere — specifically at react/socket — when:

  • You are starting anything new. Do not adopt a package with a 2017 last release and an explicit [Legacy] marker.
  • You need TLS features added after 2017: modern TLS defaults, better error surfaces, ConnectorInterface improvements, DNS-over-HTTPS resolution, happy-eyeballs-style connection racing, or HTTP proxy support.
  • You need server-side sockets — this package is client-only, and react/socket gives you both under one dependency.
  • Your team has no event-loop experience. Async sockets in a Laravel app are an operational commitment (supervisor-managed workers, no shared state with FPM, different debugging model). A synchronous HTTP client or a queue worker is almost always the cheaper correct answer.
  • Your actual need is HTTP/HTTPS. Use react/http (built on react/socket) or Guzzle's async handler — do not hand-roll HTTP over a raw TCP connector.
  • You need a supported dependency for a security review or SOC2-style audit trail. "Archived since 2017" will not clear procurement.

How to Pitch It (Stakeholders)

For executives: This is a small, MIT-licensed piece of plumbing that lets PHP hold open a network connection and stream data without tying up a web worker. It is not a product; it's a building block. The headline is that it is end-of-life — the functionality now lives in a maintained sibling package (react/socket). Recommendation: approve the capability if we have a streaming or persistent-connection requirement, but budget it as "adopt react/socket, not this," and treat any existing usage as technical debt to schedule rather than a platform to build on.

For engineering: react/socket-client is the deprecated half of ReactPHP's socket layer — async ConnectorInterface implementations for plaintext TCP and TLS. It was folded into react/socket, which is where all fixes since 2017 have landed. Do not add it to composer.json. If a transitive dependency drags it in, that's a migration ticket. If we need the capability, the correct entry point is react/socket with react/event-loop, run under a supervised long-lived process (Octane or a dedicated daemon), with explicit connect/read timeouts and TLS verification left on. Budget for the operational cost of an event loop — it is a different runtime model from PHP-FPM and the on-call story needs to reflect that.

Net PM position: capability is real and occasionally necessary; this specific package is not the vehicle. Score it as a migration source, not an adoption candidate.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core