Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djdeveloperr/deno_namedpipe
Asynchronous Named Pipes support for Deno, built on WinAPI using FFI.
https://github.com/djdeveloperr/deno_namedpipe
deno ffi namedpipe windows
Last synced: 4 months ago
JSON representation
Asynchronous Named Pipes support for Deno, built on WinAPI using FFI.
- Host: GitHub
- URL: https://github.com/djdeveloperr/deno_namedpipe
- Owner: DjDeveloperr
- License: apache-2.0
- Created: 2021-10-10T09:34:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-20T18:35:17.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T13:32:53.181Z (4 months ago)
- Topics: deno, ffi, namedpipe, windows
- Language: TypeScript
- Homepage: https://deno.land/x/namedpipe
- Size: 48.8 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Namedpipe
Asynchronous Named Pipes support for Deno, built on WinAPI using FFI.
## Usage
```ts
const conn = await connect("\\\\?\\pipe\\{name}");
// use conn
````connect` function which returns `NamedPipe` partially implements `Deno.Conn`
but for Named Pipes. API will be same as `Deno.connect` except `closeWrite` not
being implemented and `rid` being the File Handle (instead of Resource ID).This module also needs `--unstable` flag because it uses the new FFI feature to
call WinAPI.## Why?
I know you can open a Windows Named Pipe in Deno using `Deno.open` and
read/write on it, but Deno's File implementation has a problem: if your read
operation or write operation has not yet resolved, it'll block any further
read/write operation on the file which limits the usecase I had.## License
Apache-2.0 licensed. Check [LICENSE](./LICENSE) for more info.
Copyright 2022-2023 © DjDeveloperr