Skip to content
Network internalsOverview

RakBitStream.ToString

Represents a packet-stream object as a string.

Details#

Returns the byte buffer as a binary Luau string. This is not a hexadecimal dump or decoded text; embedded zero bytes remain part of the result.

Examples#

Example

Luau
local stream = raknet.BitStream.new()
stream:Write("ABC")
local bytes = stream:ToString()
print(string.byte(bytes, 1, #bytes)) -- 65 66 67