(
url: string,
options?: {
readonly openTimeout?: Duration.Input | undefined
readonly protocols?: string | Array<string> | undefined
readonly headers?: Readonly<Record<string, string>> | undefined
readonly highWaterMark?: number | undefined
}
)
| 1245 | * @since 4.0.0 |
| 1246 | */ |
| 1247 | export const makeWebSocketChannel = <IE = never>( |
| 1248 | url: string, |
| 1249 | options?: { |
| 1250 | readonly openTimeout?: Duration.Input | undefined |
| 1251 | readonly protocols?: string | Array<string> | undefined |
| 1252 | readonly headers?: Readonly<Record<string, string>> | undefined |
| 1253 | readonly highWaterMark?: number | undefined |
| 1254 | } |
| 1255 | ): Channel.Channel< |
| 1256 | NonEmptyReadonlyArray<Uint8Array>, |
| 1257 | SocketError | IE, |
| 1258 | void, |
| 1259 | NonEmptyReadonlyArray<Uint8Array | string | CloseEvent>, |
| 1260 | IE, |
| 1261 | unknown, |
| 1262 | WebSocketConstructor |
| 1263 | > => |
| 1264 | Channel.unwrap( |
| 1265 | Effect.map(makeWebSocket(url, options), toChannelWith<IE>()) |
| 1266 | ) |
| 1267 | |
| 1268 | /** |
| 1269 | * Layer that provides a `Socket` service backed by a WebSocket URL or URL |
nothing calls this directly
no test coverage detected