Options
All
  • Public
  • Public/Protected
  • All
Menu
class
classdesc

Consists of socket apis for handling user socket join, leave, status change

extends

realTimeBase

Hierarchy

  • realTimeBase
    • userSocket

Index

Constructors

constructor

  • Returns userSocket

Properties

Protected request

request: any

Protected resHeaders

resHeaders: any[] = []

Methods

broadcast

  • broadcast(data: any): void
  • Parameters

    • data: any

    Returns void

broadcastAll

  • broadcastAll(data: any): void
  • Parameters

    • data: any

    Returns void

broadcastToSockets

  • broadcastToSockets(sockets: Array<string>, data: any): void
  • Parameters

    • sockets: Array<string>
    • data: any

    Returns void

changeStatus

  • changeStatus($user: any, $data: any): Promise<void>
  • function

    changeStatus

    description

    Returns the current status of the user

    Parameters

    • $user: any

      User details of the sender

    • $data: any

      User details of the user to be removed from your list

    Returns Promise<void>

drop

  • drop(socketId: any): Promise<void>
  • function

    drop

    description

    Sockets are used for communicating with each other. An individual user login on a device corresponds to a socket. A sockets leaves a room of a conversation using drop method.

    Parameters

    • socketId: any

      Socket ID for a particular user on a device

    Returns Promise<void>

emit

  • emit(data: any): void
  • Parameters

    • data: any

    Returns void

emitToGroup

  • emitToGroup(groupId: any, data: any): void
  • Parameters

    • groupId: any
    • data: any

    Returns void

Protected emitToRequest

  • emitToRequest(data: any): void
  • Parameters

    • data: any

    Returns void

Protected log

  • log(message: string): void
  • Parameters

    • message: string

    Returns void

removeUser

  • removeUser($user: any, $data: any): Promise<void>
  • function

    removeUser

    description

    A user has contacts with different users. A list is maintained for each of the users that he has contact with. The api removes a particular user from a user's list.

    Parameters

    • $user: any

      User details of the sender

    • $data: any

      User details of the user to be removed from your list

    Returns Promise<void>

userJoined

  • userJoined($user: any, $socket: any): Promise<void>
  • function

    userJoined

    description

    Sockets are used for communicating with each other. An individual user login on a device corresponds to a socket. Socket(a user) joins a room for communication.

    Parameters

    • $user: any

      details of the sender

    • $socket: any

      Socket ID for a particular user on a device

    Returns Promise<void>

Generated using TypeDoc