Skip to main content

ZilaWS

A blazingly fast websocket library with async capabilites

Have questions? Join our Discord server!

In order for ZilaWS to work, both the server side and the client side is needed

Technically it is compatible with a simple WS server or client, however you'll need to take care of the message handling.

Installing

Client

npm install zilaws-client@latest

Server

npm install zilaws-server@latest

Main features

Waiters

ZilaWS has a unique function called waiter. Waiters (as their name suggests) can be awaited. They resolve when a MessageHandler on the other side of the connection resolves or returns thus making it perfect for retrieving data. However if the client or server does not respond in time, waiters will resolve as undefined.

Read more here

MessageHandlers

Tired of having to build an event handler system for WS messages every time you start a new project? ZilaWS got you covered with MessageHandlers!

Read more here

Extending

Since ZilaWS is object oriented, you have the ability to extend its classes! For example if you extend the ZilaClient class on the server side, you can store your own data on it which will be directly associated with the given ws client. This makes handling user data and sessions so much easier!
Also because ZilaWS is written in TypeScript, you'll have full type-support for your extended class.

Read more here

Small

CommonJS: 13KB
ESM: 13KB
UMD: 16KB
On version 2.0.0

Async

You can wait for the other side of the connection to finish its task.
Simply use the return keyword to send back data.

Easy-to-use

ZilaWS was design to be easy-to-use and fun to work with.

Fast

Average speedClient side waiter: 5 ms
Server Side waiter: 6 ms
On version 2.0.0