unlimitedbytes / adapter-uwebsockets Goto Github PK
View Code? Open in Web Editor NEWThe fastest sveltekit adapter in town.
License: MIT License
The fastest sveltekit adapter in town.
License: MIT License
I think it would be nice, if this adapter would support websockets that can be handled from within a sveltekit app.
Maybe with the new filestructure, we can use routes/ws/+websocket.js
files.
I guess we would need to create a vite plugin, to support websockets in dev mode.
How a +websocket.js file could look like:
// routes/example/+websocket.js
export function OPEN({ ws }: { ws: WebSocket }) {
}
export function MESSAGE({ ws, message, isBinary }: { ws: WebSocket; message: ArrayBuffer; isBinary: boolean }) {
}
export function CLOSE({ ws, code, message }: { ws: WebSocket; code: number; message: ArrayBuffer }) {
}
OR a default export of the WebSocketBehavior type
// routes/example/+websocket.js
/** @type import('uWebSocket').WebSocketBehavior */
export default {
open(ws) {},
message(ws, message, isBinary) {},
close(ws, code, message) {},
};
But it would be good to have the app
available in these functions as well, to publish a message. Or maybe just a publish
function that is passed as parameter to these functions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.