MCPcopy
hub / github.com/Effect-TS/effect / run

Method run

packages/platform-bun/src/internal/httpServer.ts:453–455  ·  view source on GitHub ↗
(handler: (_: Uint8Array) => Effect.Effect<_, E, R> | void, opts?: {
              readonly onOpen?: Effect.Effect<void> | undefined
            })

Source from the content-addressed store, hash-verified

451
452 const encoder = new TextEncoder()
453 const run = <R, E, _>(handler: (_: Uint8Array) => Effect.Effect<_, E, R> | void, opts?: {
454 readonly onOpen?: Effect.Effect<void> | undefined
455 }) => runRaw((data) => typeof data === "string" ? handler(encoder.encode(data)) : handler(data), opts)
456
457 return Socket.Socket.of({
458 [Socket.TypeId]: Socket.TypeId,

Callers 11

Sink.test.tsFile · 0.45
entriesFunction · 0.45
runCommandFunction · 0.45
Socket.test.tsFile · 0.45
sendBodyFunction · 0.45
defaultWriteFileFunction · 0.45
runRawFunction · 0.45
workerRunner.tsFile · 0.45
spawnFunction · 0.45
makeExecutorFunction · 0.45
messageFunction · 0.45

Calls 3

encodeMethod · 0.80
handlerFunction · 0.70
runRawFunction · 0.50

Tested by 1

entriesFunction · 0.36