Farstream.Candidate¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
base_ip |
r/w |
IP of base in dotted format as defined in ICE-19. |
|
base_port |
r/w |
Port of base as defined in ICE-19. |
|
component_id |
r/w |
value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, |
|
foundation |
r/w |
a string representing the foundation of this candidate (maximum 32 chars) |
|
ip |
r/w |
IP in dotted format |
|
password |
r/w |
Username to use to connect to client if necessary, |
|
port |
r/w |
Port to use |
|
priority |
r/w |
Value between 0 and (2^31 - 1) representing the priority |
|
proto |
r/w |
|
|
ttl |
r/w |
The TTL used when sending Multicast packet (0 = auto) |
|
type |
r/w |
The |
|
username |
r/w |
Username to use to connect to client if necessary, |
Methods¶
class |
|
class |
|
|
Details¶
- class Farstream.Candidate¶
Struct to hold information about ICE-19 compliant candidates
- classmethod new(foundation, component_id, type, proto, ip, port)¶
- Parameters:
foundation (
str
) – The foundation of the candidatecomponent_id (
int
) – The component this candidate is fortype (
Farstream.CandidateType
) – The type of candidateproto (
Farstream.NetworkProtocol
) – The protocol this component is forip (
str
orNone
) – The IP address of this component (can beNone
for local candidate to mean any address)port (
int
) – the UDP/TCP port
- Returns:
a newly-allocated
Farstream.Candidate
- Return type:
Allocates a new
Farstream.Candidate
, the rest of the fields can be optionally filled manually. See alsoFarstream.Candidate.new_full
()
- classmethod new_full(foundation, component_id, ip, port, base_ip, base_port, proto, priority, type, username, password, ttl)¶
- Parameters:
foundation (
str
) – The foundation of the candidatecomponent_id (
int
) – The component this candidate is forip (
str
orNone
) – The IP address of this component (can beNone
for local candidate to mean any address)port (
int
) – the UDP/TCP portbase_ip (
str
orNone
) – IP of base in dotted format as defined in ICE-19.base_port (
int
) – Port of base as defined in ICE-19.proto (
Farstream.NetworkProtocol
) – The protocol this component is forpriority (
int
) – Value between 0 and (2^31 - 1) representing the prioritytype (
Farstream.CandidateType
) – The type of candidateusername (
str
orNone
) – Username to use to connect to client if necessary,None
otherwisepassword (
str
orNone
) – Username to use to connect to client if necessary,None
otherwisettl (
int
) – The TTL used when sending Multicast packet (0 = auto)
- Returns:
a newly-allocated
Farstream.Candidate
- Return type:
Allocates a new
Farstream.Candidate
, filling all the fields. See alsoFarstream.Candidate.new
()
- copy()¶
- Returns:
a new
Farstream.Candidate
- Return type:
Copies a
Farstream.Candidate
and its contents.