{"id":18941219,"url":"https://github.com/reactphp/datagram","last_synced_at":"2025-04-04T22:08:47.924Z","repository":{"id":13785014,"uuid":"16480251","full_name":"reactphp/datagram","owner":"reactphp","description":"Event-driven UDP client and server sockets for ReactPHP.","archived":false,"fork":false,"pushed_at":"2024-01-04T09:11:44.000Z","size":149,"stargazers_count":94,"open_issues_count":2,"forks_count":26,"subscribers_count":10,"default_branch":"1.x","last_synced_at":"2024-04-13T16:34:16.856Z","etag":null,"topics":["datagram","php","reactphp"],"latest_commit_sha":null,"homepage":"https://reactphp.org/datagram/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reactphp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["reactphp","clue","WyriHaximus"],"open_collective":"reactphp"}},"created_at":"2014-02-03T13:30:50.000Z","updated_at":"2024-03-17T15:29:22.000Z","dependencies_parsed_at":"2024-01-09T01:09:23.563Z","dependency_job_id":"d99cf1f5-61b1-4e8a-a50d-1a19ed2df49b","html_url":"https://github.com/reactphp/datagram","commit_stats":{"total_commits":180,"total_committers":11,"mean_commits":"16.363636363636363","dds":0.2222222222222222,"last_synced_commit":"e474997aec2f04066d6d62169f6a397cc0df2842"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Fdatagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Fdatagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Fdatagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactphp%2Fdatagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reactphp","download_url":"https://codeload.github.com/reactphp/datagram/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247175231,"owners_count":20896241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datagram","php","reactphp"],"created_at":"2024-11-08T12:26:45.459Z","updated_at":"2025-04-04T22:08:47.901Z","avatar_url":"https://github.com/reactphp.png","language":"PHP","readme":"# Datagram\n\n[![CI status](https://github.com/reactphp/datagram/actions/workflows/ci.yml/badge.svg)](https://github.com/reactphp/datagram/actions)\n[![installs on Packagist](https://img.shields.io/packagist/dt/react/datagram?color=blue\u0026label=installs%20on%20Packagist)](https://packagist.org/packages/react/datagram)\n\nEvent-driven UDP datagram socket client and server for [ReactPHP](https://reactphp.org).\n\n## Quickstart example\n\nOnce [installed](#install), you can use the following code to connect to an UDP server listening on\n`localhost:1234` and send and receive UDP datagrams:  \n\n```php\n$factory = new React\\Datagram\\Factory();\n\n$factory-\u003ecreateClient('localhost:1234')-\u003ethen(function (React\\Datagram\\Socket $client) {\n    $client-\u003esend('first');\n\n    $client-\u003eon('message', function($message, $serverAddress, $client) {\n        echo 'received \"' . $message . '\" from ' . $serverAddress. PHP_EOL;\n    });\n});\n```\n\nSee also the [examples](examples).\n\n## Usage\n\nThis library's API is modelled after node.js's API for\n[UDP / Datagram Sockets (dgram.Socket)](https://nodejs.org/api/dgram.html).\n\n## Install\n\nThe recommended way to install this library is [through Composer](https://getcomposer.org/).\n[New to Composer?](https://getcomposer.org/doc/00-intro.md)\n\nThis project follows [SemVer](https://semver.org/).\nThis will install the latest supported version:\n\n```bash\ncomposer require react/datagram:^1.10\n```\n\nSee also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.\n\nThis project aims to run on any platform and thus does not require any PHP\nextensions and supports running on legacy PHP 5.3 through current PHP 8+ and\nHHVM.\nIt's *highly recommended to use PHP 7+* for this project.\n\n## Tests\n\nTo run the test suite, you first need to clone this repo and then install all\ndependencies [through Composer](https://getcomposer.org/):\n\n```bash\ncomposer install\n```\n\nTo run the test suite, go to the project root and run:\n\n```bash\nvendor/bin/phpunit\n```\n\n## License\n\nMIT, see [LICENSE file](LICENSE).\n","funding_links":["https://github.com/sponsors/reactphp","https://github.com/sponsors/clue","https://github.com/sponsors/WyriHaximus","https://opencollective.com/reactphp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactphp%2Fdatagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactphp%2Fdatagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactphp%2Fdatagram/lists"}