API reference
Preparing search index…

Integers use network order; SFML floats use host order.

Source & inheritance
Member directory14

Constructors

Methods

Constructors

Methods

  • Append a copy of the bytes directly, without a length prefix.

    Parameters

    data
    Uint8Array

    Returns

    void
    Source & inheritance
  • Clear contents, read position, and error state; old getData views retain the old storage.

    Returns

    void
    Source & inheritance
  • Return whether the read position has reached the end.

    Returns

    boolean
    Source & inheritance
  • Return a shared byte view of current contents, or undefined for an empty packet; obtain a new view after capacity grows.

    Returns

    undefined | Uint8Array
    Source & inheritance
  • Return the number of content bytes.

    Returns

    number
    Source & inheritance
  • Return the current read position in bytes.

    Returns

    number
    Source & inheritance
  • Return whether no out-of-bounds read has occurred; after one occurs, use clear or receive a new packet to recover.

    Returns

    boolean
    Source & inheritance
  • Subclasses may override the post-receive data transformation; the packet is cleared before the call, and the default appends the original contents.

    Parameters

    data
    Uint8Array

    Returns

    void
    Source & inheritance
  • Subclasses may override the pre-send data transformation; the socket copies the returned bytes when send is called.

    Returns

    Uint8Array
    Source & inheritance

Symbol members

  • Parameters

    data
    Uint8Array

    Returns

    void
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0