Skip to main content
Deno 2 is finally here 🎉️
Learn more

Sockets

Sockets

A WebSocket library for Deno.


Although Sockets has working code, it is still very much under development. APIs will change without notice. Sorry for any inconvenience!

Table of Contents

Getting Started

To get you started as quickly as possible with a simple client and server, check out the following example app:

We also have a more advanced example app:

All example apps in the example_apps directory have their own README.md file. The README.md files have all the instructions you need to get started.

Integrating

Sockets is composed of two parts:

  • A SocketServer class that is used to instantiate a socket server on the back-end

    import { SocketServer } from "https://deno.land/x/sockets@master/mod.ts";
  • A client library that loads on the front-end

    <script src="https://cdn.jsdelivr.net/gh/drashland/sockets@master/client.js">
    <script type="module" src="https://cdn.jsdelivr.net/gh/drashland/sockets@master/client-module.js">

Features

  • Binary-support

Roadmap

  • Auto-reconnection support

Contributing

Contributors are welcomed!

License

By contributing your code, you agree to license your contribution under the MIT License.