Skip to content

dimensional-fun/pogsocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PogSocket

A functional deno websocket client!

Usage

Connecting to Echo Server

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 (and parts of /pogsocket) were originally written by the Deno Authors, this couldn't have been done without them :)

melike2d

About

๐ŸŒ deno websocket client

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy