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

x/sockets/mod.ts>Sender#add

A WebSocket library for Deno.
Latest
method Sender.prototype.add
import { Sender } from "https://deno.land/x/sockets@v0.5.0/mod.ts";

Adds a new message to the message queue to be sent.

Parameters

packet: Packet
  • The item to store in the queue. This item will be sent in the order it was received as long as the queue is in a "ready" state. Being "ready" means that the queue is not currently sending any messages. Messages are not sent concurrently.
channel: Channel
  • The channel instance this packet is going to.