{"id":89085,"library":"amphp-socket","title":"Amp Socket","description":"Non-blocking socket connection / server implementations based on Amp and Revolt.","status":"active","version":"2.4.0","language":"php","source_language":null,"source_url":"https://github.com/amphp/socket","tags":["amphp","socket","non-blocking","async","networking"],"install":[{"cmd":"composer require amphp/socket","lang":"bash","label":"composer require"}],"dependencies":[],"imports":[{"symbol":"Socket","correct":"use Amp\\Socket\\Socket;"}],"quickstart":{"code":"use Amp\\Socket\\Socket;\nuse function Amp\\async;\n\n$socket = Socket::connect('tcp://example.com:80');\n$response = async(fn() => $socket->read());","lang":"php","description":"Creates a non-blocking socket connection and reads data asynchronously."},"warnings":[{"fix":"Ensure you have an event loop (e.g., Amp\\Loop::run()) before using sockets.","message":"Requires the Revolt event loop to be running; otherwise, operations may hang.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'amp':1,12 'amphp':15 'async':20 'base':10 'block':5,19 'connect':7 'implement':9 'network':21 'non':4,18 'non-block':3,17 'revolt':14 'server':8 'socket':2,6,16","created_at":"2026-06-19T08:41:51.454782+00:00","updated_at":"2026-06-19T08:41:51.454782+00:00","problems":[],"ecosystem":"packagist","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/amphp/socket","github":"https://github.com/amphp/socket","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking","async"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-19","next_check":"2026-12-16","install_tag":null}}