mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-14 06:50:00 -04:00
add nodejs support
This commit is contained in:
parent
3a2ab40e75
commit
87b887a4b7
13 changed files with 78 additions and 18 deletions
|
@ -3,10 +3,10 @@ ws ?= ?new WebSocketConstructor\(url, ?opts\)
|
|||
*/
|
||||
try {
|
||||
if (api.transport === "wisp") {
|
||||
ws = new WispWebSocket(url);
|
||||
ws = new WispWebSocket(url, WSImpl);
|
||||
}
|
||||
else if (api.transport === "wsproxy") {
|
||||
ws = new WebSocket(url);
|
||||
ws = new WSImpl(url);
|
||||
}
|
||||
else if (typeof api.transport === "string") {
|
||||
throw new TypeError("invalid transport type");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue