Package tel.schich.libdatachannel
Class PeerConnectionConfiguration
java.lang.Object
tel.schich.libdatachannel.PeerConnectionConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleaniceTransportPolicy(PeerConnectionConfiguration.IceTransportPolicy 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)intintmtu()intintstatic Collection<URI>withBindAddress(InetAddress bindAddress) (optional): if non-NULL, bind only to the given local address (ignored with libnice as ICE backend)withCertificateType(PeerConnectionConfiguration.CertificateType certificateType) (optional): certificate type, either RTC_CERTIFICATE_ECDSA or RTC_CERTIFICATE_RSA (0 or RTC_CERTIFICATE_DEFAULT if default)withDisableAutoNegotiation(boolean disableAutoNegotiation) if true, the user is responsible for calling rtcSetLocalDescription after creating a Data Channel and after setting the remote descriptionwithEnableIceTcp(boolean enableIceTcp) if true, generate TCP candidates for ICE (ignored with libjuice as ICE backend)withEnableIceUdpMux(boolean enableIceUdpMux) if true, connections are multiplexed on the same UDP port (should be combined with portRangeBegin and portRangeEnd, ignored with libnice as ICE backend)withForceMediaTransport(boolean forceMediaTransport) if true, the connection allocates the SRTP media transport even if no tracks are present (necessary to add tracks during later renegotiation)withIceServers(Collection<URI> iceServers) (optional): an array of pointers on null-terminated ICE server URIs (NULL if unused) Each entry in iceServers must match the format [("stun"|"turn"|"turns") (":"|"://")][username ":" password "@"]hostname[":" port]["?transport=" ("udp"|"tcp"|"tls")].withMaxMessageSize(int maxMessageSize) (optional): manually set the local maximum message size for Data Channels (0 if default)withMtu(int mtu) (optional): manually set the Maximum Transfer Unit (MTU) for the connection (0 if automatic)withPortRangeBegin(int portRangeBegin) (optional): first port (included) of the allowed local port range, 1 to 65535 (0 if unused)withPortRangeEnd(int portRangeEnd) (optional): last port (included) of the allowed local port range, 1 to 65535 (0 if unused)withProxyServer(URI proxyServer) (optional): if non-NULL, specifies the proxy server URI to use for TURN relaying (ignored with libjuice as ICE backend) TODO docs The proxyServer URI, if present, must match the format [("http"|"socks5") (":"|"://")][username ":" password "@"]hostname[":" port].
-
Field Details
-
AUTO_MTU
public static final int AUTO_MTU- See Also:
-
DEFAULT
-
-
Method Details
-
withIceServers
(optional): an array of pointers on null-terminated ICE server URIs (NULL if unused) Each entry in iceServers must match the format [("stun"|"turn"|"turns") (":"|"://")][username ":" password "@"]hostname[":" port]["?transport=" ("udp"|"tcp"|"tls")]. The default scheme is STUN, the default port is 3478 (5349 over TLS), and the default transport is UDP. For instance, a STUN server URI could be mystunserver.org, and a TURN server URI could be turn:myuser:12345678@turnserver.org. Note transports TCP and TLS are only available for a TURN server with libnice as ICE backend and govern only the TURN control connection, meaning relaying is always performed over UDP.- Parameters:
iceServers- the list of ICE servers- Returns:
- fluent interface
-
iceServers
-
withProxyServer
(optional): if non-NULL, specifies the proxy server URI to use for TURN relaying (ignored with libjuice as ICE backend) TODO docs The proxyServer URI, if present, must match the format [("http"|"socks5") (":"|"://")][username ":" password "@"]hostname[":" port]. The default scheme is HTTP, and the default port is 3128 for HTTP or 1080 for SOCKS5. If the username or password of an URI contains reserved special characters, they must be percent-encoded. In particular, ":" must be encoded as "%3A" and "@" must by encoded as "%40".- Parameters:
proxyServer- the proxy URI- Returns:
- fluent interface
-
proxyServer
-
withBindAddress
(optional): if non-NULL, bind only to the given local address (ignored with libnice as ICE backend)- Parameters:
bindAddress- the bind address- Returns:
- fluent interface
-
bindAddress
-
withCertificateType
public PeerConnectionConfiguration withCertificateType(PeerConnectionConfiguration.CertificateType certificateType) (optional): certificate type, either RTC_CERTIFICATE_ECDSA or RTC_CERTIFICATE_RSA (0 or RTC_CERTIFICATE_DEFAULT if default)- Parameters:
certificateType- the certificate type- Returns:
- fluent interface
-
certificateType
-
iceTransportPolicy
public PeerConnectionConfiguration iceTransportPolicy(PeerConnectionConfiguration.IceTransportPolicy 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)- Parameters:
iceTransportPolicy- the transport policy- Returns:
- fluent interface
-
iceTransportPolicy
-
withEnableIceTcp
if true, generate TCP candidates for ICE (ignored with libjuice as ICE backend)- Parameters:
enableIceTcp- whether to enable TCP candidates- Returns:
- fluent interface
-
enableIceTcp
public boolean enableIceTcp() -
withEnableIceUdpMux
if true, connections are multiplexed on the same UDP port (should be combined with portRangeBegin and portRangeEnd, ignored with libnice as ICE backend)- Parameters:
enableIceUdpMux- whether to enable multiplexing on the same UDP port- Returns:
- fluent interface
-
enableIceUdpMux
public boolean enableIceUdpMux() -
withDisableAutoNegotiation
if true, the user is responsible for calling rtcSetLocalDescription after creating a Data Channel and after setting the remote description- Parameters:
disableAutoNegotiation- whether to disable auto negotiation- Returns:
- fluent interface
-
disableAutoNegotiation
public boolean disableAutoNegotiation() -
withForceMediaTransport
if true, the connection allocates the SRTP media transport even if no tracks are present (necessary to add tracks during later renegotiation)- Parameters:
forceMediaTransport- whether to force the media transport- Returns:
- fluent interface
-
forceMediaTransport
public boolean forceMediaTransport() -
withPortRangeBegin
(optional): first port (included) of the allowed local port range, 1 to 65535 (0 if unused)- Parameters:
portRangeBegin- the beginning of the port range- Returns:
- fluent interface
-
portRangeBegin
public int portRangeBegin() -
withPortRangeEnd
(optional): last port (included) of the allowed local port range, 1 to 65535 (0 if unused)- Parameters:
portRangeEnd- the inclusive end of the port range- Returns:
- fluent interface
-
portRangeEnd
public int portRangeEnd() -
withMtu
(optional): manually set the Maximum Transfer Unit (MTU) for the connection (0 if automatic)- Parameters:
mtu- the MTU- Returns:
- fluent interface
-
mtu
public int mtu() -
withMaxMessageSize
(optional): manually set the local maximum message size for Data Channels (0 if default)- Parameters:
maxMessageSize- the maximum message size- Returns:
- fluent interface
-
maxMessageSize
public int maxMessageSize() -
uris
-