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

Function packetize

modules/crypt/ssl/ssl_handshake.js:190–200  ·  view source on GitHub ↗
(session, msgType, body)

Source from the content-addressed store, hash-verified

188 handshakeDigestUpdate(session, body);
189 },
190 packetize(session, msgType, body) {
191 session.traceProtocol(this);
192 body = body.getChunk();
193 let s = new SSLStream(undefined, 1 + 3 + body.byteLength);
194 s.writeChar(msgType);
195 s.writeChars(body.byteLength, 3);
196 s.writeChunk(body);
197 let msg = s.getChunk();
198 handshakeDigestUpdate(session, msg);
199 return recordProtocol.packetize(session, recordProtocol.handshake, msg);
200 },
201
202 // protocols
203 helloRequest: {

Callers

nothing calls this directly

Calls 15

getChunkMethod · 0.95
writeCharMethod · 0.95
writeCharsMethod · 0.95
writeChunkMethod · 0.95
writeStringMethod · 0.95
expMethod · 0.95
dhMethod · 0.95
ZMethod · 0.95
handshakeDigestUpdateFunction · 0.85
fromStringMethod · 0.80
getDHMethod · 0.80
bitLengthMethod · 0.80

Tested by

no test coverage detected