Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class IceServer
- Object
- IceServer
A STUN or TURN server a PeerConnection may use to find a path to the
other side.
A STUN server only tells a device its public address, so it needs no credentials. A TURN server relays the media when no direct path exists – behind a carrier NAT or a strict firewall, which is common on mobile networks – and is normally given short-lived credentials by the app’s own server.
Constructors
public IceServer(String[] urls, String username, String credential) |
Methods
public static IceServer stun(String url) | A server with no credentials, such as a public STUN server. |
public String[] getUrls() | |
public String getUsername() | |
public String getCredential() |
Inherited methods
Constructor details
IceServer
public IceServer(String[] urls, String username, String credential)Parameters
urlsString[]- one or more
stun:,turn:orturns:URLs for the same server usernameString- the TURN user name, or null for STUN
credentialString- the TURN password, or null for STUN
Method details
stun
public static IceServer stun(String url)A server with no credentials, such as a public STUN server.
getUrls
public String[] getUrls()getUsername
public String getUsername()getCredential
public String getCredential()