x.websocket: move to net.websocket module (#10648)

This commit is contained in:
Tomas Hellström 2021-07-03 01:56:00 +02:00 committed by GitHub
parent c44a47acb1
commit ec973f5c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 1656 additions and 67 deletions

View file

@ -1,11 +1,13 @@
// websocket module implements websocket client and a websocket server
// attribution: @thecoderr the author of original websocket client
// advice that the implementation is deprecated and moved to the net.websocket module!
// it will be removed in later versions
[manualfree]
module websocket
import net
import net.http
import x.openssl
import net.openssl
import net.urllib
import time
import log
@ -74,6 +76,7 @@ pub enum OPCode {
}
// new_client instance a new websocket client
[deprecated: 'use net.websocket module instead']
pub fn new_client(address string) ?&Client {
uri := parse_uri(address) ?
return &Client{