Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class WebSocketTransport
implements ConnectionTransport
import { WebSocketTransport } from "https://deno.land/x/pptr@1.2.0/src/BrowserWebSocketTransport.ts";

Constructors

new
WebSocketTransport(ws: WebSocket)

Properties

private
_ws: WebSocket
optional
onclose: () => void
optional
onmessage: (message: string) => void

Methods

close(): void
send(message: string): void

Static Methods

create(url: string): Promise<WebSocketTransport>