Skip to content
Network internalsOverview

RakBitStream.GetLength

Reports the size of a packet-stream object.

Details#

Returns the current byte count of a local stream, despite the BitStream name. The result is bytes rather than bits or a count of written fields.

Examples#

Example

Luau
local stream = raknet.BitStream.new()
stream:Write("abc")
print(stream:GetLength()) -- 3