@@ -366,6 +366,8 @@ int rtcSetSsrcForType(const char *mediaType, const char *sdp, char *buffer, cons
typedef struct {
bool disableTlsVerification; // if true, don't verify the TLS certificate
const char *proxyServer; // unsupported for now
+ const char **protocols;
+ int protocolsCount;
} rtcWsConfiguration;
RTC_EXPORT int rtcCreateWebSocket(const char *url); // returns ws id
@@ -1288,6 +1288,9 @@ int rtcCreateWebSocketEx(const char *url, const rtcWsConfiguration *config) {
if (config->proxyServer)
c.proxyServer.emplace(config->proxyServer);
+ for (int i = 0; i < config->protocolsCount; ++i)
+ c.protocols.emplace_back(string(config->protocols[i]));
+
auto webSocket = std::make_shared<WebSocket>(std::move(c));
webSocket->open(url);
return emplaceWebSocket(webSocket);