@mega-yfue/eufy-sdk / PushClient
Class: PushClient
Extends
EventEmitter
Constructors
Constructor
ts
new PushClient(creds, logger?): PushClient;Parameters
creds
logger?
Logger = noopLogger
Returns
PushClient
Overrides
ts
EventEmitter.constructorMethods
close()
ts
close(): void;Returns
void
connect()
ts
connect(): void;Open the MCS connection and log in.
servername is passed explicitly: Node sends SNI only when told to, never deriving it from host, and this endpoint answers a connection without SNI with a self-signed certificate naming invalid2.invalid — which now fails the handshake rather than being accepted. Verification matters because the login request carries the account's securityToken, and an unverified peer could both read it and inject forged pushes into the event path.
Returns
void
getPersistentIds()
ts
getPersistentIds(): string[];Returns
string[]
setPersistentIds()
ts
setPersistentIds(ids): void;Persistent ids already seen (set this from storage to avoid re-delivery).
Parameters
ids
string[]
Returns
void