{"action":"created","issue":{"url":"https://api.github.com/repos/reactphp/socket/issues/154","repository_url":"https://api.github.com/repos/reactphp/socket","labels_url":"https://api.github.com/repos/reactphp/socket/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/reactphp/socket/issues/154/comments","events_url":"https://api.github.com/repos/reactphp/socket/issues/154/events","html_url":"https://github.com/reactphp/socket/issues/154","id":311690674,"number":154,"title":"How to send a command to the server?","user":{"login":"wolrd","id":35338702,"avatar_url":"https://avatars3.githubusercontent.com/u/35338702?v=4","gravatar_id":"","url":"https://api.github.com/users/wolrd","html_url":"https://github.com/wolrd","followers_url":"https://api.github.com/users/wolrd/followers","following_url":"https://api.github.com/users/wolrd/following{/other_user}","gists_url":"https://api.github.com/users/wolrd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolrd/subscriptions","organizations_url":"https://api.github.com/users/wolrd/orgs","repos_url":"https://api.github.com/users/wolrd/repos","events_url":"https://api.github.com/users/wolrd/events{/privacy}","received_events_url":"https://api.github.com/users/wolrd/received_events","type":"User","site_admin":false},"labels":[{"id":4772597,"url":"https://api.github.com/repos/reactphp/socket/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-04-05T16:54:59Z","updated_at":"2018-04-06T21:15:19Z","closed_at":"2018-04-05T17:09:58Z","author_association":"NONE","body":"I start the server. I want send commands to this server - curl 127.0.0.1:8081/?command=store. \r\nHow can I do it?\r\n```\r\n$loop = \\React\\EventLoop\\Factory::create();\r\n$socket = new \\React\\Socket\\Server('127.0.0.1:8081', $loop);\r\n$socket = new \\React\\Socket\\LimitingServer($socket, null);\r\n$socket->on('connection', function(\\React\\Socket\\ConnectionInterface $connection) use ($socket){\r\n       $connection->on('data', function($data) use ($connection, $socket){\r\n         /*if(command == 'store')\r\n               foreach ($socket->getConnections() as $connection) {\r\n\t        $connection->write('store');\r\n\t       }\r\n         */\r\n          \r\n       });\t\t\r\n});\r\n\r\n$loop->run();\r\n```"},"comment":{"url":"https://api.github.com/repos/reactphp/socket/issues/comments/379381950","html_url":"https://github.com/reactphp/socket/issues/154#issuecomment-379381950","issue_url":"https://api.github.com/repos/reactphp/socket/issues/154","id":379381950,"user":{"login":"wolrd","id":35338702,"avatar_url":"https://avatars3.githubusercontent.com/u/35338702?v=4","gravatar_id":"","url":"https://api.github.com/users/wolrd","html_url":"https://github.com/wolrd","followers_url":"https://api.github.com/users/wolrd/followers","following_url":"https://api.github.com/users/wolrd/following{/other_user}","gists_url":"https://api.github.com/users/wolrd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolrd/subscriptions","organizations_url":"https://api.github.com/users/wolrd/orgs","repos_url":"https://api.github.com/users/wolrd/repos","events_url":"https://api.github.com/users/wolrd/events{/privacy}","received_events_url":"https://api.github.com/users/wolrd/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T21:15:19Z","updated_at":"2018-04-06T21:15:19Z","author_association":"NONE","body":"@clue Thank you! It works."}}
{"actor":{"display_login":"wolrd"}}