Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ else()
target_compile_definitions(datachannel PRIVATE USE_NICE=0)
target_compile_definitions(datachannel-static PRIVATE USE_NICE=0)
if(USE_SYSTEM_JUICE)
find_package(LibJuice REQUIRED)
find_package(LibJuice 1.7.0 REQUIRED)
target_compile_definitions(datachannel PRIVATE RTC_SYSTEM_JUICE=1)
target_compile_definitions(datachannel-static PRIVATE RTC_SYSTEM_JUICE=1)
target_link_libraries(datachannel PRIVATE LibJuice::LibJuice)
Expand Down
2 changes: 1 addition & 1 deletion DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Arguments:
- `bindAddress` (optional): if non-NULL, bind only to the given local address (ignored with libnice as ICE backend)
- `certificateType` (optional): certificate type, either `RTC_CERTIFICATE_ECDSA` or `RTC_CERTIFICATE_RSA` (0 or `RTC_CERTIFICATE_DEFAULT` if default)
- `iceTransportPolicy` (optional): ICE transport policy, if set to `RTC_TRANSPORT_POLICY_RELAY`, the PeerConnection will emit only relayed candidates (0 or `RTC_TRANSPORT_POLICY_ALL` if default)
- `enableIceTcp`: if true, generate TCP candidates for ICE (ignored with libjuice as ICE backend)
- `enableIceTcp`: if true, generate TCP candidates for ICE
- `enableIceUdpMux`: if true, connections are multiplexed on the same UDP port (should be combined with `portRangeBegin` and `portRangeEnd`, ignored with libnice as ICE backend)
- `disableAutoNegotiation`: if true, the user is responsible for calling `rtcSetLocalDescription` after creating a Data Channel and after setting the remote description
- `forceMediaTransport`: if true, the connection allocates the SRTP media transport even if no tracks are present (necessary to add tracks during later renegotiation)
Expand Down
2 changes: 1 addition & 1 deletion include/rtc/configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct RTC_CPP_EXPORT Configuration {
// Options
CertificateType certificateType = CertificateType::Default;
TransportPolicy iceTransportPolicy = TransportPolicy::All;
bool enableIceTcp = false; // libnice only
bool enableIceTcp = false;
bool enableIceUdpMux = false; // libjuice only
bool disableAutoNegotiation = false;
bool disableAutoGathering = false;
Expand Down
2 changes: 1 addition & 1 deletion include/rtc/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ typedef struct {
const char *bindAddress; // libjuice only, NULL means any
rtcCertificateType certificateType;
rtcTransportPolicy iceTransportPolicy;
bool enableIceTcp; // libnice only
bool enableIceTcp;
bool enableIceUdpMux; // libjuice only
bool disableAutoNegotiation;
bool forceMediaTransport;
Expand Down
2 changes: 1 addition & 1 deletion pages/content/pages/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Arguments:
- `bindAddress` (optional): if non-NULL, bind only to the given local address (ignored with libnice as ICE backend)
- `certificateType` (optional): certificate type, either `RTC_CERTIFICATE_ECDSA` or `RTC_CERTIFICATE_RSA` (0 or `RTC_CERTIFICATE_DEFAULT` if default)
- `iceTransportPolicy` (optional): ICE transport policy, if set to `RTC_TRANSPORT_POLICY_RELAY`, the PeerConnection will emit only relayed candidates (0 or `RTC_TRANSPORT_POLICY_ALL` if default)
- `enableIceTcp`: if true, generate TCP candidates for ICE (ignored with libjuice as ICE backend)
- `enableIceTcp`: if true, generate TCP candidates for ICE
- `enableIceUdpMux`: if true, connections are multiplexed on the same UDP port (should be combined with `portRangeBegin` and `portRangeEnd`, ignored with libnice as ICE backend)
- `disableAutoNegotiation`: if true, the user is responsible for calling `rtcSetLocalDescription` after creating a Data Channel and after setting the remote description
- `forceMediaTransport`: if true, the connection allocates the SRTP media transport even if no tracks are present (necessary to add tracks during later renegotiation)
Expand Down
8 changes: 4 additions & 4 deletions src/impl/icetransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ IceTransport::IceTransport(const Configuration &config, candidate_callback candi
jconfig.cb_recv = IceTransport::RecvCallback;
jconfig.user_ptr = this;

if (config.enableIceTcp) {
PLOG_WARNING << "ICE-TCP is not supported with libjuice";
}

if (config.enableIceUdpMux) {
PLOG_DEBUG << "Enabling ICE UDP mux";
jconfig.concurrency_mode = JUICE_CONCURRENCY_MODE_MUX;
Expand Down Expand Up @@ -134,6 +130,10 @@ IceTransport::IceTransport(const Configuration &config, candidate_callback candi
if (!mAgent)
throw std::runtime_error("Failed to create the ICE agent");

// ICE-TCP
juice_set_ice_tcp_mode(mAgent.get(), config.enableIceTcp ? JUICE_ICE_TCP_MODE_ACTIVE
: JUICE_ICE_TCP_MODE_NONE);

// Add TURN servers
for (const auto &server : servers)
if (!server.hostname.empty() && server.type != IceServer::Type::Stun)
Expand Down
Loading