Skip to content

@mega-yfue/eufy-sdk / p2pCodec / readNullTerminatedString

Function: readNullTerminatedString()

ts
function readNullTerminatedString(data, encoding?): string;

Read a NUL-terminated UTF-8 string (CMD_NOTIFY_PAYLOAD carries JSON this way).

Parameters

data

Buffer

encoding?

BufferEncoding = "utf8"

Returns

string

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.