MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / unpacketize

Function unpacketize

modules/crypt/ssl/ssl_alert.js:78–85  ·  view source on GitHub ↗
(session, fragment)

Source from the content-addressed store, hash-verified

76 close_notify: close_notify,
77
78 unpacketize(session, fragment) {
79 session.traceProtocol(this);
80 const s = new SSLStream(fragment);
81 session.alert = {level: s.readChar(), description: s.readChar()};
82 if (close_notify !== session.alert.description)
83 throw new TLSError("alert: " + session.alert.level + ", " + session.alert.description);
84 trace("SSL: close notify\n");
85 },
86 packetize(session, level, description) {
87 session.traceProtocol(this);
88

Callers

nothing calls this directly

Calls 2

readCharMethod · 0.95
traceProtocolMethod · 0.45

Tested by

no test coverage detected