Core
ManualSocketCloseReason
Close code and reason recorded when a session is closed with session.close.
@defjs/core · Type
Signature
type ManualSocketCloseReason = { code?: number; kind: "manual-web-socket-close"; reason?: string; };
Records the code and reason passed to session.close(code?, reason?). They fill code and reason of the final { kind: 'closed' } close info when the peer's close event carries none. close throws a DOMException when a provided code is not the integer 1000 or an integer from 3000 through 4999, and when reason exceeds 123 UTF-8 bytes. Omitting code is allowed.
Members
Prop
Type
code? number | undefinedkind "manual-web-socket-close"reason? string | undefined