Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/snel/imports/wocket.ts>Sender#add

A Cybernetical framework for svelte applications in deno
Latest
method Sender.prototype.add
import { Sender } from "https://deno.land/x/snel@v0.7.1/imports/wocket.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.
optional
clientToSendTo: number
  • If set, only send to the specific client with that id