(clientId: number)
| 146 | ) |
| 147 | |
| 148 | const disconnect = (clientId: number) => |
| 149 | Effect.suspend(() => { |
| 150 | const client = clients.get(clientId) |
| 151 | if (!client) return Effect.void |
| 152 | for (const fiber of client.fibers.values()) { |
| 153 | fiber.unsafeInterruptAsFork(fiberIdTransientInterrupt) |
| 154 | } |
| 155 | clients.delete(clientId) |
| 156 | return Effect.void |
| 157 | }) |
| 158 | |
| 159 | const write = (clientId: number, message: FromClient<Rpcs>): Effect.Effect<void> => |
| 160 | Effect.catchAllDefect( |
nothing calls this directly
no test coverage detected