1.0.2 • Published 3 years ago

@casthub/echo-driver v1.0.2

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
3 years ago

This is a Laravel Echo Driver for AWS API Gateway WebSockets, developed for use in CastHub.

Technically it would work for any custom WebSocket implementation that resembles the Pusher driver specification.

Usage

When creating a new Echo instance using laravel-echo, you can provide a custom driver. All you need to do is provide this package as that driver. For example:

import { Broadcaster } from '@casthub/echo-driver';

const echo = new Echo({
    broadcaster: 'pusher',
    client: new Broadcaster({
        host: 'wss://my-url',
    }),
});

The Driver follows the same specification as the Pusher Client, whilst still using Pusher as the broadcaster.

AWS

TODO: