Top |
NiceCandidate * | nice_candidate_new () |
void | nice_candidate_free () |
NiceCandidate * | nice_candidate_copy () |
gboolean | nice_candidate_equal_target () |
const gchar * | nice_candidate_transport_to_string () |
const gchar * | nice_candidate_type_to_string () |
void | nice_candidate_relay_address () |
gboolean | nice_candidate_stun_server_address () |
struct | NiceCandidate |
enum | NiceCandidateType |
enum | NiceCandidateTransport |
enum | NiceRelayType |
#define | NICE_CANDIDATE_MAX_FOUNDATION |
#define | NICE_CANDIDATE_MAX_TURN_SERVERS |
#define | NICE_CANDIDATE_MAX_LOCAL_ADDRESSES |
GBoxed ╰── NiceCandidate GEnum ├── NiceCandidateTransport ├── NiceCandidateType ╰── NiceRelayType
A representation of an ICE candidate. Make sure you read the ICE drafts[1] to understand correctly the concept of ICE candidates.
[1] http://tools.ietf.org/wg/mmusic/draft-ietf-mmusic-ice/
NiceCandidate *
nice_candidate_new (NiceCandidateType type
);
Creates a new candidate. Must be freed with nice_candidate_free()
NiceCandidate *
nice_candidate_copy (const NiceCandidate *candidate
);
Makes a copy of a NiceCandidate
gboolean nice_candidate_equal_target (const NiceCandidate *candidate1
,const NiceCandidate *candidate2
);
Verifies that the candidates point to the same place, meaning they have the same transport and the same address. It ignores all other aspects.
Since: 0.1.15
const gchar *
nice_candidate_transport_to_string (NiceCandidateTransport transport
);
Useful for debugging functions, just returns a static string with the candidate transport.
Since: 0.1.19
const gchar *
nice_candidate_type_to_string (NiceCandidateType type
);
Useful for debugging functions, just returns a static string with the candidate type.
Since: 0.1.19
void nice_candidate_relay_address (const NiceCandidate *candidate
,NiceAddress *addr
);
In case the given candidate is relayed through a TURN server, use this utility function to get its address.
Since: 0.1.19
gboolean nice_candidate_stun_server_address (const NiceCandidate *candidate
,NiceAddress *addr
);
In case the given candidate server-reflexive, use this utility function to get its address. The address will be filled only if the candidate was generated using an STUN server.
Since: 0.1.20
struct NiceCandidate { NiceCandidateType type; NiceCandidateTransport transport; NiceAddress addr; NiceAddress base_addr; guint32 priority; guint stream_id; guint component_id; gchar foundation[NICE_CANDIDATE_MAX_FOUNDATION]; gchar *username; /* pointer to a nul-terminated username string */ gchar *password; /* pointer to a nul-terminated password string */ };
A structure to represent an ICE candidate
The priority
is an integer as specified in the ICE draft 19. If you are
using the MSN or the GOOGLE compatibility mode (which are based on ICE
draft 6, which uses a floating point qvalue as priority), then the priority
value will represent the qvalue multiplied by 1000.
NiceCandidateType |
The type of candidate |
|
NiceCandidateTransport |
The transport being used for the candidate |
|
NiceAddress |
The NiceAddress of the candidate |
|
NiceAddress |
The NiceAddress of the base address used by the candidate |
|
The priority of the candidate see note |
||
The ID of the stream to which belongs the candidate |
||
The ID of the component to which belongs the candidate |
||
The foundation of the candidate |
||
The candidate-specific username to use (overrides the one set
by |
||
The candidate-specific password to use (overrides the one set
by |
#define NICE_CANDIDATE_MAX_FOUNDATION (32+1)
The maximum size a candidate foundation can have.
#define NICE_CANDIDATE_MAX_TURN_SERVERS 8
The maximum number of turns servers.
#define NICE_CANDIDATE_MAX_LOCAL_ADDRESSES 64
The maximum number of local addresses. The constraint is that the
maximum number of local addresses and number of turn servers must
fit on 9 bits, to ensure candidate priority uniqueness. See also
NICE_CANDIDATE_MAX_TURN_SERVERS
. We choose 6 bits for the number of
local addresses, and 3 bits for the number of turn servers.