{"id":20144740,"url":"https://github.com/widuu/php_nanomsg","last_synced_at":"2025-04-09T19:17:41.281Z","repository":{"id":43611992,"uuid":"71512165","full_name":"widuu/php_nanomsg","owner":"widuu","description":"PHP Nanomsg Extension Support PHP7 \u0026\u0026 PHP5","archived":false,"fork":false,"pushed_at":"2017-04-18T13:57:59.000Z","size":14,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T19:17:37.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/widuu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-20T23:21:07.000Z","updated_at":"2023-09-04T06:40:44.000Z","dependencies_parsed_at":"2022-09-11T10:40:35.960Z","dependency_job_id":null,"html_url":"https://github.com/widuu/php_nanomsg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widuu%2Fphp_nanomsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widuu%2Fphp_nanomsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widuu%2Fphp_nanomsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widuu%2Fphp_nanomsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/widuu","download_url":"https://codeload.github.com/widuu/php_nanomsg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094988,"owners_count":21046770,"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":[],"created_at":"2024-11-13T22:11:57.659Z","updated_at":"2025-04-09T19:17:41.253Z","avatar_url":"https://github.com/widuu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php_nanomsg\n\n[![Build Status](https://travis-ci.org/widuu/php_nanomsg.svg?branch=master)](https://travis-ci.org/widuu/php_nanomsg)\n\n## Requirements\n\n* PHP 5.3+\n* nanomsg 1.0.0\n\n## INSTALL\n\nFirst , you need to install nanomsg \n\n```\ngit clone https://github.com/widuu/php_nanomsg.git\nphpize\n./configure \nmake CFLAGS=\"-I/yourpath/nanomsg/1.0.0/include\" LDFLAGS=\"-L/yourpath/nanomsg/1.0.0/lib -lnanomsg\" \nmake install\n```\n\nThen add `extension=nanomsg.so` to your `php.ini`.\n\n## Usage Example\n\n```php\n\u003c?php\n\nif (!extension_loaded('nanomsg')) {\n    die(\"nanomsg extension not loaded\");\n}\n\n$address = 'ipc:///tmp/test.ipc';\n\n$sock1 = new Nanomsg( NanoMsg::AF_SP, NanoMsg::NN_PAIR );\n$sock2 = new Nanomsg( NanoMsg::AF_SP, NanoMsg::NN_PAIR );\n\n$sock1-\u003ebind($address);\n$sock2-\u003econnect($address);\n\n$sock1-\u003esend('It Works!', 0);\n\n$sock2-\u003esetOption( NanoMsg::NN_SOL_SOCKET, NanoMsg::NN_RCVTIMEO, 100 );\n$value = $sock2-\u003egetOption( NanoMsg::NN_SOL_SOCKET, NanoMsg::NN_RCVTIMEO );\n\n$data = $sock2-\u003erecv(0, 0);\n\necho \"received: \" . $data . \"\\n\";\n\n?\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiduu%2Fphp_nanomsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiduu%2Fphp_nanomsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiduu%2Fphp_nanomsg/lists"}