Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ClientToClientCommands

Index

Constructors

constructor

Properties

Private protocol

protocol: MPDProtocol

Methods

channels

  • channels(): Promise<string[]>
  • Obtain a list of all channels.

    Returns Promise<string[]>

readMessages

  • readMessages(): Promise<Map<string, string[]>>
  • Reads messages for this client. Returns a Map containing the messages grouped by channel name.

    Returns Promise<Map<string, string[]>>

sendMessage

  • sendMessage(channel: string, text: string): Promise<void>
  • Send a message to the specified channel.

    Parameters

    • channel: string
    • text: string

    Returns Promise<void>

subscribe

  • subscribe(channel: string): Promise<void>
  • Subscribe to a channel. The channel is created if it does not exist already. The name may consist of alphanumeric ASCII characters plus underscore, dash, dot and colon.

    Parameters

    • channel: string

    Returns Promise<void>

unsubscribe

  • unsubscribe(channel: string): Promise<void>
  • Unsubscribe from a channel.

    Parameters

    • channel: string

    Returns Promise<void>

Generated using TypeDoc