MCPcopy Create free account
hub / github.com/Effect-TS/effect / close

Function close

packages/platform/node-shared/src/NodeSocket.ts:250–255  ·  view source on GitHub ↗
(err: Socket.SocketError)

Source from the content-addressed store, hash-verified

248 }
249 // Teardown or failure: consumed bytes are discarded.
250 function close(err: Socket.SocketError) {
251 error ??= err
252 closed = true
253 pending = undefined
254 drain()
255 }
256 function onEnd() {
257 end(new Socket.SocketError({ reason: new Socket.SocketCloseError({ code: 1000 }) }))
258 }

Callers 5

onErrorFunction · 0.70
onCloseFunction · 0.70
fromDuplexFunction · 0.70
failUpgradeFunction · 0.70
upgradeFunction · 0.70

Calls 1

drainFunction · 0.70

Tested by

no test coverage detected