AbstractOptionalprotocols: string | string[]AbstractreadyA WebSocket.readyState property that is compatible with the native property
(https://developer.mozilla.org/docs/Web/API/WebSocket/readyState) and the ws package's
property (https://github.com/websockets/ws/blob/HEAD/doc/ws.md#websocketreadystate)
AbstractsendA WebSocket.send method that is compatible with the native method
(https://developer.mozilla.org/docs/Web/API/WebSocket/send) and the ws package's method
(https://github.com/websockets/ws/blob/HEAD/doc/ws.md#websocketsenddata-options-callback)
AbstractaddA WebSocket.addEventListener method that is compatible with the native method
(https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener) and the ws
package's method
(https://github.com/websockets/ws/blob/HEAD/doc/ws.md#websocketaddeventlistenertype-listener-options)
Optionaloptions: CommonWebSocketListenerOptionsAbstractcloseA WebSocket.close method that is compatible with the native method
(https://developer.mozilla.org/docs/Web/API/WebSocket/close) and the ws package's method
(https://github.com/websockets/ws/blob/HEAD/doc/ws.md#websocketclosecode-reason)
AbstractremoveA WebSocket.removeEventListener method that is compatible with the native method
(https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener) and the ws
package's method
(https://github.com/websockets/ws/blob/HEAD/doc/ws.md#websocketremoveeventlistenertype-listener)
A WebSocket interface that matches both client-side WebSockets and host-side WebSockets.
Package
@rest-vir/define-service