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

Function nodeResponse

packages/platform-node/src/internal/httpServer.ts:175–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 let upgraded = false
174 let nodeResponse_: Http.ServerResponse | undefined = undefined
175 const nodeResponse = () => {
176 if (nodeResponse_ === undefined) {
177 nodeResponse_ = new Http.ServerResponse(nodeRequest)
178 if (upgraded) {
179 nodeResponse_.end()
180 } else {
181 nodeResponse_.assignSocket(socket as any)
182 nodeResponse_.on("finish", () => {
183 socket.end()
184 })
185 }
186 }
187 return nodeResponse_
188 }
189 const upgradeEffect = Socket.fromWebSocket(Effect.flatMap(
190 lazyWss,
191 (wss) =>

Callers

nothing calls this directly

Calls 1

endMethod · 0.65

Tested by

no test coverage detected