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

x/wocket/src/server.ts>Server#to

A WebSocket library for Deno
Latest
method Server.prototype.to
import { Server } from "https://deno.land/x/wocket@v1.0.0/src/server.ts";

Send a message to the channel, so clients listening on that channel will receive this message

Parameters

channelName: string
  • The channel to send the message to
message: Record<string, unknown> | string
  • The message to send
optional
onlySendTo: number
  • Id of a client, if you only wish to send the message to just that client