Method
createSocket
(
uri: string,
protocols: string | string[] | undefined,
opts: Record<string, any>,
)
Source from the content-addressed store, hash-verified
| 165 | */ |
| 166 | export class WS extends BaseWS { |
| 167 | createSocket( |
| 168 | uri: string, |
| 169 | protocols: string | string[] | undefined, |
| 170 | opts: Record<string, any>, |
| 171 | ) { |
| 172 | return !isReactNative |
| 173 | ? protocols |
| 174 | ? new WebSocketCtor(uri, protocols) |
| 175 | : new WebSocketCtor(uri) |
| 176 | : new WebSocketCtor(uri, protocols, opts); |
| 177 | } |
| 178 | |
| 179 | doWrite(_packet: Packet, data: RawData) { |
| 180 | this.ws.send(data); |
Tested by
no test coverage detected