amphp/socket
Async, non-blocking socket library for AMPHP. Provides client/server abstractions over TCP, UDP, and Unix domain sockets with DNS resolution, retries, connect timeouts, cancellation, and optional TLS encryption. Implements ReadableStream/WritableStream.
stream_socket_* calls.fsockopen()/stream_socket_server() code to non-blocking.stream_socket_* or ReactPHP instead.amphp/http-client or Guzzle).ratchetphp/ws-server or beberlei/ratchet)."This package lets us replace slow, blocking PHP networking with high-performance, non-blocking sockets—critical for scaling our real-time features (e.g., live collaboration, APIs) without adding servers. It’s battle-tested in the Amp ecosystem, supports modern TLS, and integrates seamlessly with our existing PHP stack. The MIT license and active maintenance (last release: 2026) make it a low-risk bet. Early adopters like [Example Company] use it to handle 10x more concurrent connections than traditional PHP."
*"amphp/socket gives us:
stream_select() hacks).Trade-offs:
Proposal:
Amp\Timer to validate latency improvements."*Key Metric to Track: "Reduce P99 latency for network-bound operations by 50% while cutting server costs."
How can I help you explore Laravel packages today?