https://github.com/dimensional-fun/pogsocket
🌐 deno websocket client
https://github.com/dimensional-fun/pogsocket
deno typescript websocket
Last synced: 4 months ago
JSON representation
🌐 deno websocket client
- Host: GitHub
- URL: https://github.com/dimensional-fun/pogsocket
- Owner: dimensional-fun
- License: mit
- Created: 2021-08-12T21:30:50.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T22:46:15.000Z (over 3 years ago)
- Last Synced: 2025-12-12T23:07:11.586Z (6 months ago)
- Topics: deno, typescript, websocket
- Language: TypeScript
- Homepage:
- Size: 18.6 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PogSocket
> A functional deno websocket client!
## Usage
**Connecting to Echo Server**
```ts
import { connectPogSocket, readSocket, sendMessage } from "https://deno.land/x/pogsocket/mod.ts";
const socket = await connectPogSocket("ws://localhost:3030");
setInterval(() => sendMessage(socket, "hello me!"), 2000);
for await (const event of readSocket(socket)) {
if (event.type === "message") {
console.log(event.message);
}
}
```
## Acknowledgements
- [_/websocket_](/websocket) (and parts of [_/pogsocket_](/pogsocket)) were originally written by the **Deno Authors**, this couldn't have been done without them :)
---
[melike2d](https://dimensional.fun)