在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Askedio/laravel-ratchet开源软件地址(OpenSource Url):https://github.com/Askedio/laravel-ratchet开源编程语言(OpenSource Language):PHP 95.8%开源软件介绍(OpenSource Introduction):Laravel Ratchet ServerThis package enables you to create and run a fully functioning WebSocket server in your Laravel app. It can optionally receive messages broadcast over ZeroMQ. Requirements
Installation$ composer require askedio/laravel-ratchet The service provider is loaded automatically in Laravel 5.5 using Package Autodiscovery. Publish the vendor files so you can configure your server defaults. $ php artisan vendor:publish --provider="Askedio\LaravelRatchet\Providers\LaravelRatchetServiceProvider" Starting the ServerAfter completing installation, the quickest way to start a standard WebSocket server is simply by running: $ php artisan ratchet:serve --driver=WsServer This will run a simple example server based on It's possible to create a WampServer or an IoServer also. Use the You should create your own server class inside your Then update your Use with Laravel BroadcastingTo use broadcasting in your Laravel app with the server you create, you will need a ZeroMQ broadcast driver for Laravel (e.g. this one). You will also need to tell your Ratchet server to bind to a ZeroMQ socket. You can do this simply by passing the $ php artisan ratchet:serve --driver=WsServer -z This will connect to the socket you define in your To handle messages published via ZeroMQ, simply add a |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论