Farstream.Candidate

Fields

Name

Type

Access

Description

base_ip

str

r/w

IP of base in dotted format as defined in ICE-19.

base_port

int

r/w

Port of base as defined in ICE-19.

component_id

int

r/w

value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, Farstream.ComponentType can be used here)

foundation

str

r/w

a string representing the foundation of this candidate (maximum 32 chars)

ip

str

r/w

IP in dotted format

password

str

r/w

Username to use to connect to client if necessary, None otherwise

port

int

r/w

Port to use

priority

int

r/w

Value between 0 and (2^31 - 1) representing the priority

proto

Farstream.NetworkProtocol

r/w

Farstream.NetworkProtocol for ip protocol to use as candidate

ttl

int

r/w

The TTL used when sending Multicast packet (0 = auto)

type

Farstream.CandidateType

r/w

The Farstream.CandidateType of the candidate

username

str

r/w

Username to use to connect to client if necessary, None otherwise

Methods

class

new (foundation, component_id, type, proto, ip, port)

class

new_full (foundation, component_id, ip, port, base_ip, base_port, proto, priority, type, username, password, ttl)

copy ()

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 candidate

  • component_id (int) – The component this candidate is for

  • type (Farstream.CandidateType) – The type of candidate

  • proto (Farstream.NetworkProtocol) – The protocol this component is for

  • ip (str or None) – The IP address of this component (can be None for local candidate to mean any address)

  • port (int) – the UDP/TCP port

Returns:

a newly-allocated Farstream.Candidate

Return type:

Farstream.Candidate

Allocates a new Farstream.Candidate, the rest of the fields can be optionally filled manually. See also Farstream.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 candidate

  • component_id (int) – The component this candidate is for

  • ip (str or None) – The IP address of this component (can be None for local candidate to mean any address)

  • port (int) – the UDP/TCP port

  • base_ip (str or None) – 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 for

  • priority (int) – Value between 0 and (2^31 - 1) representing the priority

  • type (Farstream.CandidateType) – The type of candidate

  • username (str or None) – Username to use to connect to client if necessary, None otherwise

  • password (str or None) – Username to use to connect to client if necessary, None otherwise

  • ttl (int) – The TTL used when sending Multicast packet (0 = auto)

Returns:

a newly-allocated Farstream.Candidate

Return type:

Farstream.Candidate

Allocates a new Farstream.Candidate, filling all the fields. See also Farstream.Candidate.new()

copy()
Returns:

a new Farstream.Candidate

Return type:

Farstream.Candidate

Copies a Farstream.Candidate and its contents.