Merge branch 'master' of github.com:beyondcode/laravel-websockets

This commit is contained in:
Marcel Pociot 2018-12-04 21:04:26 +01:00
commit 432c26d3c7
4 changed files with 31 additions and 36 deletions

View File

@ -5,7 +5,7 @@
[![Quality Score](https://img.shields.io/scrutinizer/g/beyondcode/laravel-websockets.svg?style=flat-square)](https://scrutinizer-ci.com/g/beyondcode/laravel-websockets) [![Quality Score](https://img.shields.io/scrutinizer/g/beyondcode/laravel-websockets.svg?style=flat-square)](https://scrutinizer-ci.com/g/beyondcode/laravel-websockets)
[![Total Downloads](https://img.shields.io/packagist/dt/beyondcode/laravel-websockets.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-websockets) [![Total Downloads](https://img.shields.io/packagist/dt/beyondcode/laravel-websockets.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-websockets)
Bring the power of WebSockets to your Laravel application. Drop-in Pusher replacement, SSL support, Laravel Echo support and a debug dashboard are just some of it's features. Bring the power of WebSockets to your Laravel application. Drop-in Pusher replacement, SSL support, Laravel Echo support and a debug dashboard are just some of its features.
## Installation ## Installation
@ -31,7 +31,7 @@ To start the WebSocket server, use:
php artisan websockets:serve php artisan websockets:serve
``` ```
For in-depth usage and deployment details, please take a look at the [official documentation](https://docs.beyondco.de/laravel-websockets/) For in-depth usage and deployment details, please take a look at the [official documentation](https://docs.beyondco.de/laravel-websockets/).
### Changelog ### Changelog

View File

@ -1,6 +1,6 @@
{ {
"name": "beyondcode/laravel-websockets", "name": "beyondcode/laravel-websockets",
"description": "", "description": "An easy to use WebSocket server",
"keywords": [ "keywords": [
"beyondcode", "beyondcode",
"laravel-websockets" "laravel-websockets"
@ -37,7 +37,7 @@
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^1.2", "mockery/mockery": "^1.2",
"orchestra/testbench": "~3.5", "orchestra/testbench": "3.7.*",
"phpunit/phpunit": "^7.0" "phpunit/phpunit": "^7.0"
}, },
"autoload": { "autoload": {

View File

@ -2,12 +2,12 @@
return [ return [
/** /*
* This package comes with multi tenancy out of the box. Here you can * This package comes with multi tenancy out of the box. Here you can
* configure the different apps that can use the webSockets server. * configure the different apps that can use the webSockets server.
* *
* Optionally you can disable client events so clients cannot send * Optionally you can disable client events so clients cannot send
* messages through each other via the webSockets. * messages to each other via the webSockets.
*/ */
'apps' => [ 'apps' => [
[ [
@ -20,18 +20,18 @@ return [
], ],
], ],
/** /*
* This class is responsible for finding the apps. The default provider * This class is responsible for finding the apps. The default provider
* will use the apps defined in this config file. * will use the apps defined in this config file.
* *
* You can create a custom provider by implementing the * You can create a custom provider by implementing the
* `appProvier` interface. * `AppProvider` interface.
*/ */
'app_provider' => BeyondCode\LaravelWebSockets\Apps\ConfigAppProvider::class, 'app_provider' => BeyondCode\LaravelWebSockets\Apps\ConfigAppProvider::class,
/* /*
* This array contains the hosts of which you want to allow incoming requests. * This array contains the hosts of which you want to allow incoming requests.
* Leave this empty if you want to accepts requests from all hosts. * Leave this empty if you want to accept requests from all hosts.
*/ */
'allowed_origins' => [ 'allowed_origins' => [
// //
@ -47,6 +47,26 @@ return [
*/ */
'path' => 'laravel-websockets', 'path' => 'laravel-websockets',
'statistics' => [
/*
* This model will be used to store the statistics of the WebSocketsServer.
* The only requirement is that the model should extend
* `WebSocketsStatisticsEntry` provided by this package.
*/
'model' => \BeyondCode\LaravelWebSockets\Statistics\Models\WebSocketsStatisticsEntry::class,
/*
* Here you can specify the interval in seconds at which statistics should be logged.
*/
'interval_in_seconds' => 60,
/*
* When the clean-command is executed, all recorded statistics older than
* the number of days specified here will be deleted.
*/
'delete_statistics_older_than_days' => 60
],
/* /*
* Define the optional SSL context for your WebSocket connections. * Define the optional SSL context for your WebSocket connections.
* You can see all available options at: http://php.net/manual/en/context.ssl.php * You can see all available options at: http://php.net/manual/en/context.ssl.php
@ -67,28 +87,8 @@ return [
'local_pk' => null, 'local_pk' => null,
/* /*
* Passphrase with which your local_cert file was encoded. * Passphrase for your local_cert file.
*/ */
'passphrase' => null 'passphrase' => null
], ],
'statistics' => [
/*
* This model will be used to store the statistics of the WebSocketsServer.
* The only requirement is that the model should be or extend
* `WebSocketsStatisticsEntry` provided by this package.
*/
'model' => \BeyondCode\LaravelWebSockets\Statistics\Models\WebSocketsStatisticsEntry::class,
/*
* Here you can specify the interval in seconds at which statistics should be logged.
*/
'interval_in_seconds' => 60,
/*
* When the clean-command is executed, all recorded statistics older than
* the number of days specified here will be deleted.
*/
'delete_statistics_older_than_days' => 60
],
]; ];

View File

@ -8,11 +8,6 @@ use React\Promise\FulfilledPromise;
class DnsResolver extends Resolver class DnsResolver extends Resolver
{ {
public function __construct()
{
//
}
public function resolve($domain) public function resolve($domain)
{ {
return new FulfilledPromise('127.0.0.1'); return new FulfilledPromise('127.0.0.1');