Options
All
  • Public
  • Public/Protected
  • All
Menu

A socket connection to Nakama server.

Hierarchy

  • Socket

Implemented by

Index

Methods

acceptPartyMember

  • acceptPartyMember(party_id: string, presence: Presence): Promise<void>

addMatchmaker

  • addMatchmaker(query: string, minCount: number, maxCount: number, stringProperties?: Record<string, string>, numericProperties?: Record<string, number>): Promise<MatchmakerTicket>
  • Parameters

    • query: string
    • minCount: number
    • maxCount: number
    • Optional stringProperties: Record<string, string>
    • Optional numericProperties: Record<string, number>

    Returns Promise<MatchmakerTicket>

addMatchmakerParty

  • addMatchmakerParty(party_id: string, query: string, min_count: number, max_count: number, string_properties?: Record<string, string>, numericProperties?: Record<string, number>): Promise<PartyMatchmakerTicket>
  • Parameters

    • party_id: string
    • query: string
    • min_count: number
    • max_count: number
    • Optional string_properties: Record<string, string>
    • Optional numericProperties: Record<string, number>

    Returns Promise<PartyMatchmakerTicket>

closeParty

  • closeParty(party_id: string): Promise<void>
  • Parameters

    • party_id: string

    Returns Promise<void>

connect

createMatch

  • createMatch(): Promise<Match>

createParty

  • createParty(open: boolean, max_size: number): Promise<Party>

disconnect

  • disconnect(fireDisconnectEvent: boolean): void
  • Parameters

    • fireDisconnectEvent: boolean

    Returns void

followUsers

  • followUsers(user_ids: string[]): Promise<Status>

joinChat

  • joinChat(target: string, type: number, persistence: boolean, hidden: boolean): Promise<Channel>
  • Parameters

    • target: string
    • type: number
    • persistence: boolean
    • hidden: boolean

    Returns Promise<Channel>

joinMatch

  • joinMatch(match_id?: string, token?: string, metadata?: {}): Promise<Match>
  • Parameters

    • Optional match_id: string
    • Optional token: string
    • Optional metadata: {}

      Returns Promise<Match>

    joinParty

    • joinParty(party_id: string): Promise<void>
    • Parameters

      • party_id: string

      Returns Promise<void>

    leaveChat

    • leaveChat(channel_id: string): Promise<void>
    • Parameters

      • channel_id: string

      Returns Promise<void>

    leaveMatch

    • leaveMatch(matchId: string): Promise<void>
    • Parameters

      • matchId: string

      Returns Promise<void>

    leaveParty

    • leaveParty(party_id: string): Promise<void>
    • Parameters

      • party_id: string

      Returns Promise<void>

    listPartyJoinRequests

    onchannelmessage

    • onchannelmessage(channelMessage: ChannelMessage): void
    • Parameters

      • channelMessage: ChannelMessage

      Returns void

    onchannelpresence

    ondisconnect

    • ondisconnect(evt: Event): void

    onerror

    • onerror(evt: Event): void

    onmatchdata

    onmatchmakermatched

    onmatchmakerticket

    onmatchpresence

    onnotification

    onparty

    • onparty(party: Party): void

    onpartyclose

    • onpartyclose(partyClose: PartyClose): void
    • Parameters

      • partyClose: PartyClose

      Returns void

    onpartydata

    onpartyjoinrequest

    onpartyleader

    onpartymatchmakerticket

    onpartypresence

    onstatuspresence

    onstreamdata

    onstreampresence

    promotePartyMember

    removeChatMessage

    • removeChatMessage(channel_id: string, message_id: string): Promise<ChannelMessageAck>

    removeMatchmaker

    • removeMatchmaker(ticket: string): Promise<void>
    • Parameters

      • ticket: string

      Returns Promise<void>

    removeMatchmakerParty

    • removeMatchmakerParty(party_id: string, ticket: string): Promise<void>
    • Parameters

      • party_id: string
      • ticket: string

      Returns Promise<void>

    removePartyMember

    • removePartyMember(party_id: string, presence: Presence): Promise<void>

    rpc

    • rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>
    • Parameters

      • Optional id: string
      • Optional payload: string
      • Optional http_key: string

      Returns Promise<ApiRpc>

    sendMatchState

    • sendMatchState(matchId: string, opCode: number, data: any, presence?: Presence[]): Promise<void>
    • Parameters

      • matchId: string
      • opCode: number
      • data: any
      • Optional presence: Presence[]

      Returns Promise<void>

    sendPartyData

    • sendPartyData(party_id: string, opcode: number, data: any): Promise<void>
    • Parameters

      • party_id: string
      • opcode: number
      • data: any

      Returns Promise<void>

    unfollowUsers

    • unfollowUsers(user_ids: string[]): Promise<void>
    • Parameters

      • user_ids: string[]

      Returns Promise<void>

    updateChatMessage

    • updateChatMessage(channel_id: string, message_id: string, content: any): Promise<ChannelMessageAck>

    updateStatus

    • updateStatus(status?: string): Promise<void>
    • Parameters

      • Optional status: string

      Returns Promise<void>

    writeChatMessage

    Generated using TypeDoc