Add zlib for ixwebsocket

This commit is contained in:
Oleg.Korshul
2021-07-01 15:29:31 +03:00
parent 9a91fac28c
commit ed9bb79889
3 changed files with 38 additions and 8 deletions

View File

@ -46,14 +46,21 @@ namespace NSNetwork
{
std::shared_ptr<IWebSocket> createWebsocket(const std::string& type, std::shared_ptr<IListener> listener, const std::string& url)
{
std::string sType = type;
if (sType.empty())
{
// TODO: default engine for platform
sType = "ixwebsocket";
}
#ifdef USE_IXWEBSOCKET
if (type == "ixwebsocket")
if (sType == "ixwebsocket")
{
return std::make_shared<CIXWebSocket>(url, listener);
}
#endif
#ifdef USE_SOCKETROCKET
if (type == "socketRocket")
if (sType == "socketRocket")
{
return std::make_shared<CSocketRocket>(url, listener);
}