A socketit socket.
The socket to extend.
const {Socket} = require('socketit')
const ws = new WebSocket("ws://someurl.com")
const socket = new Socket(ws)
Handle a request.
The request ID to handle.
The function to be called when the request is called.
Send a request and await the results.
The ID of the request.
Optional data to be passed along with the request.
A promise that resolves with the response.
Get a duplex stream with an ID.
The id of the stream.
A Duplex stream that is piped over WebSockets to the other party.
Generated using TypeDoc
A socketit socket, adapted for use in the browser.