Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebSocketConnection

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _matchmakingInfo

_matchmakingInfo: IMatchmakingInfo | undefined

Optional buffer

buffer: Uint8Array

Optional bufferOffset

bufferOffset: undefined | number

Optional bufferPacketId

bufferPacketId: undefined | number

Optional lastPacketNumberReceived

lastPacketNumberReceived: undefined | number

Optional lastPacketNumberSent

lastPacketNumberSent: undefined | number

matchmakingIdentifier

matchmakingIdentifier: string

name

name: string = "WebSocketConnection"

Optional pid

pid: undefined | number

playerIdentifier

playerIdentifier: string | undefined

playerSteamId

playerSteamId: string | undefined

Methods

addConnectionTimeout

  • addConnectionTimeout(): void

addKeepAliveTimeout

  • addKeepAliveTimeout(): void

addTimeout

  • addTimeout(milliseconds: number, callback: () => void): void
  • Parameters

    • milliseconds: number
    • callback: () => void
        • (): void
        • Returns void

    Returns void

clearQueuedPackets

  • clearQueuedPackets(): void

clearTimeout

  • clearTimeout(): boolean

close

  • close(): void

getState

isConnected

  • isConnected(): boolean

processMatchmakingMessage

processQueuedPackets

  • processQueuedPackets(): void

queuePacket

  • queuePacket(packet: IPacket): void
  • Queues a packet to be sent soon Note: packets are serialized when queued

    Parameters

    Returns void

send

  • send(data: ArrayBuffer | Uint8Array): void
  • Parameters

    • data: ArrayBuffer | Uint8Array

    Returns void

sendKeepAlive

  • sendKeepAlive(): void

sendPacket

  • sendPacket(packet: IPacket): void

serializePacket

  • serializePacket(packet: IPacket): ArrayBuffer

setState

Generated using TypeDoc