MCPcopy Create free account
hub / github.com/effect-app/libs / write

Function write

repos/effect/packages/effect/src/unstable/socket/Socket.ts:725–733  ·  view source on GitHub ↗
(chunk: Uint8Array | string | CloseEvent)

Source from the content-addressed store, hash-verified

723 }
724 if (opts?.onOpen) yield* opts.onOpen
725 return yield* Effect.catchFilter(
726 FiberSet.join(fiberSet),
727 SocketCloseError.filterClean((_) => !closeCodeIsError(_)),
728 () => Effect.void
729 )
730 })).pipe(
731 Effect.updateContext((input: Context.Context<R>) => Context.merge(acquireContext, input)),
732 Effect.ensuring(Effect.sync(() => {
733 latch.closeUnsafe()
734 currentWS = undefined
735 }))
736 )

Callers 1

toChannelMapFunction · 0.70

Calls 7

isCloseEventFunction · 0.85
getWriterFunction · 0.85
whenOpenMethod · 0.80
syncMethod · 0.80
closeMethod · 0.80
writeMethod · 0.65
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…