MCPcopy Create free account
hub / github.com/porsager/postgres / connect

Function connect

cf/polyfills.js:112–129  ·  view source on GitHub ↗
({ socket: tcp, servername })

Source from the content-addressed store, hash-verified

110
111export const tls = {
112 connect({ socket: tcp, servername }) {
113 tcp.writer.releaseLock()
114 tcp.reader.releaseLock()
115 tcp.readyState = 'upgrading'
116 tcp.raw = tcp.raw.startTls({ servername })
117 tcp.raw.closed.then(
118 () => tcp.emit('close'),
119 (e) => tcp.emit('error', e)
120 )
121 tcp.writer = tcp.raw.writable.getWriter()
122 tcp.reader = tcp.raw.readable.getReader()
123
124 tcp.writer.ready.then(() => {
125 tcp.read()
126 tcp.readyState = 'upgrade'
127 })
128 return tcp
129 }
130}
131
132function Socket() {

Callers

nothing calls this directly

Calls 6

readFirstFunction · 0.85
closeFunction · 0.70
readFunction · 0.70
errorFunction · 0.70
readMethod · 0.65
thenMethod · 0.45

Tested by

no test coverage detected