Connects to the host either using Steam Networking, WebRTC, or WebSockets (in that order)

Hierarchy

Constructors

Properties

_matchmakingInfo: undefined | IMatchmakingInfo
buffer?: Uint8Array
bufferOffset?: number
bufferPacketId?: number
clientSecret: string
lastPacketNumberReceived?: number
lastPacketNumberSent?: number
log: Log
matchmakingIdentifier: string
name: string = "SmartConnection"
pid?: number
playerIdentifier: undefined | string
playerSteamId: undefined | string

Accessors

  • get isConnected(): boolean
  • Returns boolean

  • get isLocalPlayer(): boolean
  • Returns boolean

  • get isSteamNetworkConnection(): boolean
  • Returns boolean

  • get maxMessageSize(): number
  • Returns number

Methods

  • Returns void

  • Returns void

  • Parameters

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

    Returns void

  • Clears queued packets

    Returns void

  • Returns boolean

  • Parameters

    • closeImmediately: boolean

    Returns void

  • Returns void

  • Returns void

  • Sends queued packets w/ flow control

    Returns void

  • Queues a packet to be sent soon Note: packets are serialized when queued

    Parameters

    Returns void

  • Queues data to be sent soon

    Parameters

    • data: ArrayBuffer
    • Optional packetNumber: number

    Returns void

  • Sends data to the connection

    Returns

    True when sent, false when it was not sent and should be retried. Throws an error if something very bad happened

    Parameters

    • data: Uint8Array

      Data to send

    • byteOffset: number
    • Optional length: number

    Returns boolean

  • Sends a ping packet to the server every so often. The server should send back a pong packet.

    Returns void

  • Sends a packet to the connection w/ flow control

    Parameters

    Returns void

Generated using TypeDoc