Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnisLielturks committed Dec 5, 2018
1 parent 04a18ec commit c3d2488
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
62 changes: 62 additions & 0 deletions config/broadcasting.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/

'default' => env('BROADCAST_DRIVER', 'null'),

/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/

'connections' => [

'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],

'redis' => [
'driver' => 'redis',
'connection' => 'default',
],

'log' => [
'driver' => 'log',
],

'null' => [
'driver' => 'null',
],

'socketio' => [
'driver' => 'socketio'
]

],

];
4 changes: 3 additions & 1 deletion src/SocketIOBRoadcaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace ArnisLielturks\SocketIOBroadcaster;

use ElephantIO\Client;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
use ElephantIO\Engine\SocketIO\Version2X;
use Illuminate\Broadcasting\Broadcasters\Broadcaster;
use Symfony\Component\HttpKernel\Exception\HttpException;

Expand Down Expand Up @@ -75,7 +77,7 @@ public function validAuthenticationResponse($request, $result)
public function broadcast(array $channels, $event, array $payload = [])
{
try {
$url = $this->config('server');
$url = $this->config['server'];
$client = new Client(new Version2X( $url, [
'headers' => [
]
Expand Down

0 comments on commit c3d2488

Please sign in to comment.