Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Connector

Hierarchy

Index

Constructors

constructor

  • Create a new class instance.

    Parameters

    Returns Connector

Properties

channels

channels: any

All of the subscribed channel names.

options

options: Config

Connector options.

Methods

channel

  • channel(channel: string): Channel
  • Get a channel instance by name.

    Parameters

    • channel: string

    Returns Channel

connect

  • connect(): void
  • Create a fresh connection.

    Returns void

disconnect

  • disconnect(): void
  • Disconnect from the Echo server.

    Returns void

leave

  • leave(channel: string): void
  • Leave the given channel.

    Parameters

    • channel: string

    Returns void

listen

  • listen(name: string, event: string, callback: function): Channel
  • Listen for an event on a channel instance.

    Parameters

    • name: string
    • event: string
    • callback: function
        • (event: any): void
        • Parameters

          • event: any

          Returns void

    Returns Channel

presenceChannel

  • Get a presence channel instance by name.

    Parameters

    • channel: string

    Returns PresenceChannel

privateChannel

  • Get a private channel instance by name.

    Parameters

    • channel: string

    Returns PrivateChannel

socketId

  • socketId(): string
  • Get the socket_id of the connection.

    Returns string