Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConnectionManager

Laravel Echo connection manager

Hierarchy

Implements

Index

Properties

Protected callbacks

callbacks: object

An array of callbacks per event name

Type declaration

  • [eventName: string]: function[]

Protected csrfToken

csrfToken: string | null = null

debugEvents

debugEvents: boolean = false

Protected echo

echo: Echo | null = null

Protected host

host: string | null = null

Methods

__@iterator

channel

  • channel(type: ChannelType, name: string, rejoinOnReconnect?: undefined | true | false): Channel
  • Get a Channel instance.

    Parameters

    • type: ChannelType

      Channel type.

    • name: string

      Channel name.

    • Optional rejoinOnReconnect: undefined | true | false

      Whether this channel should automatically rejoin on echo reconnect.

    Returns Channel

connect

  • connect(host: string | null, csrfToken: string | null, forceReconnect?: boolean): void
  • Connect or reconnect to a host.

    Parameters

    • host: string | null
    • csrfToken: string | null
    • Default value forceReconnect: boolean = false

    Returns void

disconnect

  • disconnect(): void

dispatch

  • dispatch<T>(name: T, payload: Payloads[T]): void

leave

  • leave(name: string): void

off

on

once

reconnect

  • reconnect(): void

Private replaceEcho

  • replaceEcho(echo: Echo | null, host: string | null, csrfToken: string | null): void
  • Replace the internal Echo instance

    Parameters

    • echo: Echo | null
    • host: string | null
    • csrfToken: string | null

    Returns void

Object literals

Protected channels

channels: object

presence

presence: object

Type declaration

private

private: object

Type declaration

public

public: object

Type declaration

Protected rejoinOnReconnect

rejoinOnReconnect: object

presence

presence: object

Type declaration

private

private: object

Type declaration

public

public: object

Type declaration

Generated using TypeDoc