mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 22:40:01 -04:00
add custom network transport support
This commit is contained in:
parent
53a474430a
commit
be3fc7286c
3 changed files with 23 additions and 1 deletions
|
@ -1,4 +1,14 @@
|
|||
/* REPLACE
|
||||
new WebSocketConstructor
|
||||
*/
|
||||
new WispWebSocket
|
||||
new ((() => {
|
||||
if (api.transport === "wisp") {
|
||||
return WispWebSocket;
|
||||
}
|
||||
else if (api.transport === "wsproxy") {
|
||||
return WebSocket;
|
||||
}
|
||||
else { //custom transports
|
||||
return api.transport;
|
||||
}
|
||||
})())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue