Append a copy of the bytes directly, without a length prefix.
dataClear contents, read position, and error state; old getData views retain the old storage.
Return whether the read position has reached the end.
Return a shared byte view of current contents, or undefined for an empty packet; obtain a new view after capacity grows.
Return the number of content bytes.
Return the current read position in bytes.
Return whether no out-of-bounds read has occurred; after one occurs, use clear or receive a new packet to recover.
ProtectedonSubclasses may override the post-receive data transformation; the packet is cleared before the call, and the default appends the original contents.
dataProtectedonSubclasses may override the pre-send data transformation; the socket copies the returned bytes when send is called.
Decode according to type and advance the position; if data is insufficient, return undefined and mark the packet invalid.
typeEncode and append a value according to type, returning this; string uses SFML UTF-32, while utf8 uses a byte string.
typevalue
Integers use network order; SFML floats use host order.