Added client mode support to HTTP::Websocket, added websockettest binary, added ws/wss protocol support to HTTP::URL, added support for websockets and socket overriding to HTTP::Downloader, fixed HTTP parser not handling response codes 1XX, 204 and 304 correctly.

This commit is contained in:
Thulinma 2020-09-01 12:42:25 +02:00
parent 57b930020b
commit 37af199a1c
9 changed files with 214 additions and 42 deletions

View file

@ -147,10 +147,13 @@ uint32_t HTTP::URL::getPort() const{
uint32_t HTTP::URL::getDefaultPort() const{
if (protocol == "http"){return 80;}
if (protocol == "https"){return 443;}
if (protocol == "ws"){return 80;}
if (protocol == "wss"){return 443;}
if (protocol == "rtmp"){return 1935;}
if (protocol == "rtmps"){return 443;}
if (protocol == "dtsc"){return 4200;}
if (protocol == "rtsp"){return 554;}
if (protocol == "srt"){return 8889;}
return 0;
}