Browse docspacket.bytes
On this page
API method

packet.bytes

Returns payload bytes as an array of numbers.

Syntax

Atlas Script
packet.bytes(offset?, count?)

Parameters

offset Optional
Byte offset into the packet. Payload-relative for packet.* methods, and absolute (whole IP packet) for the raw_* variants.
count Optional
Optional number of bytes to include. Omit it to run to the end of the payload; a larger count is clamped to the bytes available.

Return value

Returns payload bytes as an array of numbers.

Remarks

Returns payload bytes as an array of numbers. With no arguments, returns the whole payload; with only an offset, the bytes from there to the end. count is clamped to the bytes available, and an offset past the end returns an empty array.

Examples

Usage pattern
// Replace offset, count with values described above.
packet.bytes(offset, count);
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.