Gjsify LogoGjsify Logo

The #NiceAgent is the main GObject of the libnice library and represents the ICE agent.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

bytestream_tcp: boolean

This property defines whether receive/send over a TCP or pseudo-TCP, in reliable mode, are considered as packetized or as bytestream. In unreliable mode, every send/recv is considered as packetized, and this property is ignored and cannot be set. In reliable mode, this property will always return %TRUE in the %NICE_COMPATIBILITY_GOOGLE compatibility mode. If the property is %TRUE, the stream is considered in bytestream mode and data can be read with any receive size. If the property is %FALSE, then the stream is considred packetized and each receive will return one packet of the same size as what was sent from the peer. If in packetized mode, then doing a receive with a size smaller than the packet, will cause the remaining bytes in the packet to be dropped, breaking the reliability of the stream. This property is currently read-only, and will become read/write once bytestream mode will be supported.

compatibility: number

The Nice agent can work in various compatibility modes depending on what the application/peer needs. See also: #NiceCompatibility

consent_freshness: boolean

Whether to perform periodic consent freshness checks as specified in RFC 7675. When %TRUE, the agent will periodically send binding requests to the peer to maintain the consent to send with the peer. On receipt of any authenticated error response, a component will immediately move to the failed state.

Setting this property to %TRUE implies that 'keepalive-conncheck' should be %TRUE as well.

controlling_mode: boolean

Whether the agent has the controlling role. This property should be modified before gathering candidates, any modification occuring later will be hold until ICE is restarted.

force_relay: boolean

Force all traffic to go through a relay for added privacy, this allows hiding the local IP address. When this is enabled, so local candidates are available before relay servers have been set with nice_agent_set_relay_info().

full_mode: boolean
g_type_instance: TypeInstance
ice_tcp: boolean

Whether the agent should use ICE-TCP when gathering candidates. If the option is disabled, no TCP candidates will be generated. If the agent is in reliable mode, then pseudotcp will need to be used over UDP candidates. This option should be set before gathering candidates and should not be modified afterwards. The #NiceAgent:ice-tcp property can be set at the same time as the #NiceAgent:ice-udp property, but both cannot be unset at the same time. If #NiceAgent:ice-udp is set to %FALSE, then this property cannot be set to %FALSE as well. ICE-TCP is only supported for %NICE_COMPATIBILITY_RFC5245, %NICE_COMPATIBILITY_OC2007 and %NICE_COMPATIBILITY_OC2007R2 compatibility modes.

ice_trickle: boolean

Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21. When %TRUE, the agent will postpone changing a component state to %NICE_COMPONENT_STATE_FAILED until nice_agent_peer_candidate_gathering_done() has been called with the ID of the component's stream.

ice_udp: boolean

Whether the agent should use ICE-UDP when gathering candidates. If the option is disabled, no UDP candidates will be generated. If the agent is in reliable mode, then pseudotcp will not be used since pseudotcp works on top of UDP candidates. This option should be set before gathering candidates and should not be modified afterwards. The #NiceAgent:ice-udp property can be set at the same time as the #NiceAgent:ice-tcp property, but both cannot be unset at the same time. If #NiceAgent:ice-tcp is set to %FALSE, then this property cannot be set to %FALSE as well.

idle_timeout: number

A final timeout in msec, launched when the agent becomes idle, before stopping its activity.

This timer will delay the decision to set a component as failed. This delay is added to reduce the chance to see the agent receiving new stun activity just after the conncheck list has been declared failed (some valid pairs, no nominated pair, and no in-progress pairs), reactiviting conncheck activity, and causing a (valid) state transitions like that: connecting -> failed -> connecting -> connected -> ready. Such transitions are not buggy per-se, but may break the test-suite, that counts precisely the number of time each state has been set, and doesnt expect these transcient failed states.

This timer is also useful when the agent is in controlled mode and the other controlling peer takes some time to elect its nominated pair (this may be the case for SfB peers).

This timer is NOT part if the RFC5245, as this situation is not covered in sect 8.1.2 "Updating States", but deals with a real use-case, where a controlled agent can not wait forever for the other peer to make a nomination decision.

Also note that the value of this timeout will not delay the emission of 'connected' and 'ready' agent signals, and will not slow down the behaviour of the agent when the peer agent works in a timely manner.

keepalive_conncheck: boolean

Use binding requests as keepalives instead of binding indications. This means that the keepalives may time out which will change the component state to %NICE_COMPONENT_STATE_FAILED.

Enabing this is a slight violation of RFC 5245 section 10 which recommends using Binding Indications for keepalives.

This is always enabled if the compatibility mode is %NICE_COMPATIBILITY_GOOGLE.

This is always enabled if the 'consent-freshness' property is %TRUE

main_context: object

A GLib main context is needed for all timeouts used by libnice. This is a property being set by the nice_agent_new() call.

max_connectivity_checks: number
proxy_ip: string

The proxy server IP used to bypass a proxy firewall

proxy_password: string

The password used to authenticate with the proxy

proxy_port: number

The proxy server port used to bypass a proxy firewall

proxy_type: number

The type of proxy set in the proxy-ip property

proxy_username: string

The username used to authenticate with the proxy

reliable: boolean

Whether the agent is providing a reliable transport of messages (through ICE-TCP or PseudoTCP over ICE-UDP)

stun_initial_timeout: number

The initial timeout (msecs) of the STUN binding requests used in the gathering stage, to find our local candidates. This property is described as 'RTO' in the RFC 5389 and RFC 5245. This timeout is doubled for each retransmission, until #NiceAgent:stun-max-retransmissions have been done, with an exception for the last restransmission, where the timeout is divided by two instead (RFC 5389 indicates that a customisable multiplier 'Rm' to 'RTO' should be used).

stun_max_retransmissions: number

The maximum number of retransmissions of the STUN binding requests used in the gathering stage, to find our local candidates, and used in the connection check stage, to test the validity of each constructed pair. This property is described as 'Rc' in the RFC 5389, with a default value of 7. The timeout of each STUN request is doubled for each retransmission, so the choice of this value has a direct impact on the time needed to move from the CONNECTED state to the READY state, and on the time needed to complete the GATHERING state.

stun_pacing_timer: number
stun_reliable_timeout: number

The initial timeout of the STUN binding requests used for a reliable timer.

stun_server: string
stun_server_port: number
support_renomination: boolean

Support RENOMINATION STUN attribute proposed here: https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As soon as RENOMINATION attribute is received from remote candidate's address, corresponding candidates pair gets selected. This is specific to Google Chrome/libWebRTC.

upnp: boolean

Whether the agent should use UPnP to open a port in the router and get the external IP

upnp_timeout: number

The maximum amount of time (in milliseconds) to wait for UPnP discovery to finish before signaling the #NiceAgent::candidate-gathering-done signal

$gtype: GType<Agent>
name: string

Methods

  • Add a local address from which to derive local host candidates for candidate gathering. Since 0.0.5, if this method is not called, libnice will automatically discover the local addresses available

    See also: nice_agent_gather_candidates()

    Parameters

    • addr: Nice.Address

      The address to listen to If the port is 0, then a random port will be chosen by the system

    Returns boolean

  • add_stream(n_components: number): number
  • Adds a data stream to agent containing n_components components. The returned stream ID is guaranteed to be positive on success.

    Parameters

    • n_components: number

      The number of components to add to the stream

    Returns number

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transform_to: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transform_from: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • Asynchronously closes resources the agent has allocated on remote servers.

    The agent will call the callback in the current #GMainContext in which this function is called. The #GAsyncResult in the callback can be ignored as this operation never fails.

    Calling this function before freeing the agent makes sure the allocated relay ports aren't left behind on TURN server but properly removed.

    Parameters

    Returns void

  • connect_after(sigName: "candidate-gathering-done", callback: Agent_CandidateGatheringDoneSignalCallback): number
  • connect_after(sigName: "component-state-changed", callback: Agent_ComponentStateChangedSignalCallback): number
  • connect_after(sigName: "initial-binding-request-received", callback: Agent_InitialBindingRequestReceivedSignalCallback): number
  • connect_after(sigName: "new-candidate", callback: Agent_NewCandidateSignalCallback): number
  • connect_after(sigName: "new-candidate-full", callback: Agent_NewCandidateFullSignalCallback): number
  • connect_after(sigName: "new-remote-candidate", callback: Agent_NewRemoteCandidateSignalCallback): number
  • connect_after(sigName: "new-remote-candidate-full", callback: Agent_NewRemoteCandidateFullSignalCallback): number
  • connect_after(sigName: "new-selected-pair", callback: Agent_NewSelectedPairSignalCallback): number
  • connect_after(sigName: "new-selected-pair-full", callback: Agent_NewSelectedPairFullSignalCallback): number
  • connect_after(sigName: "reliable-transport-writable", callback: Agent_ReliableTransportWritableSignalCallback): number
  • connect_after(sigName: "streams-removed", callback: Agent_StreamsRemovedSignalCallback): number
  • connect_after(sigName: "notify::bytestream-tcp", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::compatibility", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::consent-freshness", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::controlling-mode", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::force-relay", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::full-mode", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::ice-tcp", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::ice-trickle", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::ice-udp", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::idle-timeout", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::keepalive-conncheck", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::main-context", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::max-connectivity-checks", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::proxy-ip", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::proxy-password", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::proxy-port", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::proxy-type", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::proxy-username", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::reliable", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::stun-initial-timeout", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::stun-max-retransmissions", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::stun-pacing-timer", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::stun-reliable-timeout", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::stun-server", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::stun-server-port", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::support-renomination", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::upnp", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: "notify::upnp-timeout", callback: (($obj: Agent, pspec: ParamSpec) => void)): number
  • connect_after(sigName: string, callback: ((...args: any[]) => void)): number
  • consent_lost(stream_id: number, component_id: number): boolean
  • Notifies the agent that consent to receive has been revoked. This will cause the component to fail with 403 'Forbidden' all incoming STUN binding requests as specified in RFC 7675.

    A stream with a component in the consent-lost state can be reused by performing an ice restart with nice_agent_restart() or nice_agent_restart_stream().

    Calling the function only has an effect when agent has been created with NICE_AGENT_OPTION_CONSENT_FRESHNESS.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns boolean

  • disconnect(id: number): void
  • emit(sigName: "candidate-gathering-done", stream_id: number, ...args: any[]): void
  • emit(sigName: "component-state-changed", stream_id: number, component_id: number, state: number, ...args: any[]): void
  • emit(sigName: "initial-binding-request-received", stream_id: number, ...args: any[]): void
  • emit(sigName: "new-candidate", stream_id: number, component_id: number, foundation: string, ...args: any[]): void
  • emit(sigName: "new-candidate-full", candidate: Nice.Candidate, ...args: any[]): void
  • emit(sigName: "new-remote-candidate", stream_id: number, component_id: number, foundation: string, ...args: any[]): void
  • emit(sigName: "new-remote-candidate-full", candidate: Nice.Candidate, ...args: any[]): void
  • emit(sigName: "new-selected-pair", stream_id: number, component_id: number, lfoundation: string, rfoundation: string, ...args: any[]): void
  • emit(sigName: "new-selected-pair-full", stream_id: number, component_id: number, lcandidate: Nice.Candidate, rcandidate: Nice.Candidate, ...args: any[]): void
  • emit(sigName: "reliable-transport-writable", stream_id: number, component_id: number, ...args: any[]): void
  • emit(sigName: "streams-removed", stream_ids: number[], ...args: any[]): void
  • emit(sigName: "notify::bytestream-tcp", ...args: any[]): void
  • emit(sigName: "notify::compatibility", ...args: any[]): void
  • emit(sigName: "notify::consent-freshness", ...args: any[]): void
  • emit(sigName: "notify::controlling-mode", ...args: any[]): void
  • emit(sigName: "notify::force-relay", ...args: any[]): void
  • emit(sigName: "notify::full-mode", ...args: any[]): void
  • emit(sigName: "notify::ice-tcp", ...args: any[]): void
  • emit(sigName: "notify::ice-trickle", ...args: any[]): void
  • emit(sigName: "notify::ice-udp", ...args: any[]): void
  • emit(sigName: "notify::idle-timeout", ...args: any[]): void
  • emit(sigName: "notify::keepalive-conncheck", ...args: any[]): void
  • emit(sigName: "notify::main-context", ...args: any[]): void
  • emit(sigName: "notify::max-connectivity-checks", ...args: any[]): void
  • emit(sigName: "notify::proxy-ip", ...args: any[]): void
  • emit(sigName: "notify::proxy-password", ...args: any[]): void
  • emit(sigName: "notify::proxy-port", ...args: any[]): void
  • emit(sigName: "notify::proxy-type", ...args: any[]): void
  • emit(sigName: "notify::proxy-username", ...args: any[]): void
  • emit(sigName: "notify::reliable", ...args: any[]): void
  • emit(sigName: "notify::stun-initial-timeout", ...args: any[]): void
  • emit(sigName: "notify::stun-max-retransmissions", ...args: any[]): void
  • emit(sigName: "notify::stun-pacing-timer", ...args: any[]): void
  • emit(sigName: "notify::stun-reliable-timeout", ...args: any[]): void
  • emit(sigName: "notify::stun-server", ...args: any[]): void
  • emit(sigName: "notify::stun-server-port", ...args: any[]): void
  • emit(sigName: "notify::support-renomination", ...args: any[]): void
  • emit(sigName: "notify::upnp", ...args: any[]): void
  • emit(sigName: "notify::upnp-timeout", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • force_floating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • forget_relays(stream_id: number, component_id: number): boolean
  • Forget all the relay servers previously added using nice_agent_set_relay_info(). Currently connected streams will keep using the relay as long as they have not been restarted and haven't succesfully negotiated a different path.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns boolean

  • freeze_notify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • gather_candidates(stream_id: number): boolean
  • Allocate and start listening on local candidate ports and start the remote candidate gathering process. Once done, #NiceAgent::candidate-gathering-done is called for the stream. As soon as this function is called, #NiceAgent::new-candidate signals may be emitted, even before this function returns.

    nice_agent_get_local_candidates() will only return non-empty results after calling this function.

    See also: nice_agent_add_local_address() See also: nice_agent_set_port_range()

    Parameters

    • stream_id: number

      The ID of the stream to start

    Returns boolean

  • Generate an SDP string representing a local candidate.

    See also: nice_agent_parse_remote_candidate_sdp() See also: nice_agent_generate_local_sdp() See also: nice_agent_generate_local_stream_sdp()

    Parameters

    Returns string

  • generate_local_sdp(): string
  • Generate an SDP string containing the local candidates and credentials for all streams and components in the agent.

    The SDP will not contain any codec lines and the 'm' line will not list any payload types. It is highly recommended to set names on the streams prior to calling this function. Unnamed streams will show up as '-' in the 'm' line, but the SDP will not be parseable with nice_agent_parse_remote_sdp() if a stream is unnamed. The default candidate in the SDP will be selected based on the lowest priority candidate for the first component.

    See also: nice_agent_set_stream_name() See also: nice_agent_parse_remote_sdp() See also: nice_agent_generate_local_stream_sdp() See also: nice_agent_generate_local_candidate_sdp() See also: nice_agent_get_default_local_candidate()

    Returns string

  • generate_local_stream_sdp(stream_id: number, include_non_ice: boolean): string
  • Generate an SDP string containing the local candidates and credentials for a stream.

    The SDP will not contain any codec lines and the 'm' line will not list any payload types. It is highly recommended to set the name of the stream prior to calling this function. Unnamed streams will show up as '-' in the 'm' line. The default candidate in the SDP will be selected based on the lowest priority candidate.

    See also: nice_agent_set_stream_name() See also: nice_agent_parse_remote_stream_sdp() See also: nice_agent_generate_local_sdp() See also: nice_agent_generate_local_candidate_sdp() See also: nice_agent_get_default_local_candidate()

    Parameters

    • stream_id: number

      The ID of the stream

    • include_non_ice: boolean

      Whether or not to include non ICE specific lines (m=, c= and a=rtcp: lines)

    Returns string

  • get_component_state(stream_id: number, component_id: number): ComponentState
  • get_data(key?: string): object
  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • get_default_local_candidate(stream_id: number, component_id: number): Nice.Candidate
  • This helper function will return the recommended default candidate to be used for non-ICE compatible clients. This will usually be the candidate with the lowest priority, since it will be the longest path but the one with the most chances of success. This function is only useful in order to manually generate the local SDP

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns Nice.Candidate

  • get_io_stream(stream_id: number, component_id: number): IOStream
  • Gets a #GIOStream wrapper around the given stream and component in agent. The I/O stream will be valid for as long as stream_id is valid. The #GInputStream and #GOutputStream implement #GPollableInputStream and #GPollableOutputStream.

    This function may only be called on reliable #NiceAgents. It is a programming error to try and create an I/O stream wrapper for an unreliable stream.

    Parameters

    • stream_id: number

      The ID of the stream to wrap

    • component_id: number

      The ID of the component to wrap

    Returns IOStream

  • get_local_candidates(stream_id: number, component_id: number): Nice.Candidate[]
  • Retrieve from the agent the list of all local candidates for a stream's component

    The caller owns the returned GSList as well as the candidates contained within it. To get full results, the client should wait for the #NiceAgent::candidate-gathering-done signal.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns Nice.Candidate[]

  • get_local_credentials(stream_id: number): [boolean, string, string]
  • Gets the local credentials for stream stream_id. This may be called any time after creating a stream using nice_agent_add_stream().

    An error will be returned if this is called for a non-existent stream, or if either of ufrag or pwd are %NULL.

    Parameters

    • stream_id: number

      The ID of the stream

    Returns [boolean, string, string]

  • get_property(property_name?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional property_name: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • get_qdata(quark: number): object
  • get_remote_candidates(stream_id: number, component_id: number): Nice.Candidate[]
  • Get a list of the remote candidates set on a stream's component

    The caller owns the returned GSList as well as the candidates contained within it. The list of remote candidates can change during processing. The client should register for the #NiceAgent::new-remote-candidate signal to get notified of new remote candidates.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns Nice.Candidate[]

  • Retreive the selected candidate pair for media transmission for a given stream's component.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    • local: Nice.Candidate

      The local selected candidate

    • remote: Nice.Candidate

      The remote selected candidate

    Returns boolean

  • get_selected_socket(stream_id: number, component_id: number): Gio.Socket
  • Retreive the local socket associated with the selected candidate pair for media transmission for a given stream's component.

    This is useful for adding ICE support to legacy applications that already have a protocol that maintains a connection. If the socket is duplicated before unrefing the agent, the application can take over and continue to use it. New applications are encouraged to use the built in libnice stream handling instead and let libnice handle the connection maintenance.

    Users of this method are encouraged to not use a TURN relay or any kind of proxy, as in this case, the socket will not be available to the application because the packets are encapsulated.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns Gio.Socket

  • get_sockets(stream_id: number, component_id: number): Gio.Socket[]
  • Each component can have multiple sockets, this is an API to retrieve them all to be able to set properties. Most of the sockets for a component are created when calling nice_agent_gather_candidates(), so this API should be called right after to able to set properties on the sockets before they are used.

    These sockets can be a mix of UDP & TCP sockets depending on the compatibility mode and options that have been set.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    Returns Gio.Socket[]

  • get_stream_name(stream_id: number): string
  • This function will return the name assigned to a stream.

    See also: nice_agent_set_stream_name()

    Parameters

    • stream_id: number

      The ID of the stream to change

    Returns string

  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • is_floating(): boolean
  • notify(property_name: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • property_name: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • parse_remote_candidate_sdp(stream_id: number, sdp: string): Nice.Candidate
  • Parse an SDP string and extracts the candidate from it.

    See also: nice_agent_generate_local_candidate_sdp() See also: nice_agent_parse_remote_sdp() See also: nice_agent_parse_remote_stream_sdp()

    Parameters

    • stream_id: number

      The ID of the stream the candidate belongs to

    • sdp: string

      The remote SDP to parse

    Returns Nice.Candidate

  • parse_remote_sdp(sdp: string): number
  • Parse an SDP string and extracts candidates and credentials from it and sets them on the agent.

    See also: nice_agent_set_stream_name() See also: nice_agent_generate_local_sdp() See also: nice_agent_parse_remote_stream_sdp() See also: nice_agent_parse_remote_candidate_sdp()

    Parameters

    • sdp: string

      The remote SDP to parse

    Returns number

  • parse_remote_stream_sdp(stream_id: number, sdp: string, ufrag: string, pwd: string): Nice.Candidate[]
  • Parse an SDP string representing a single stream and extracts candidates and credentials from it.

    See also: nice_agent_generate_local_stream_sdp() See also: nice_agent_parse_remote_sdp() See also: nice_agent_parse_remote_candidate_sdp()

    Parameters

    • stream_id: number

      The ID of the stream to parse

    • sdp: string

      The remote SDP to parse

    • ufrag: string

      Pointer to store the ice ufrag if non %NULL. Must be freed with g_free() after use

    • pwd: string

      Pointer to store the ice password if non %NULL. Must be freed with g_free() after use

    Returns Nice.Candidate[]

  • peer_candidate_gathering_done(stream_id: number): boolean
  • Notifies the agent that the remote peer has concluded candidate gathering and thus no more remote candidates are expected to arrive for stream_id.

    This will allow the stream components without a successful connectivity check to stop waiting for more candidates to come and finally transit into %NICE_COMPONENT_STATE_FAILED.

    Calling the function has an effect only when #NiceAgent:trickle-ice is %TRUE.

    Parameters

    • stream_id: number

      The ID of the stream

    Returns boolean

  • recv(stream_id: number, component_id: number, cancellable: Gio.Cancellable): [number, Uint8Array]
  • A single-message version of nice_agent_recv_messages().

    Parameters

    • stream_id: number

      the ID of the stream to receive on

    • component_id: number

      the ID of the component to receive on

    • cancellable: Gio.Cancellable

      a #GCancellable to allow the operation to be cancelled from another thread, or %NULL

    Returns [number, Uint8Array]

  • Block on receiving data from the given stream/component combination on agent, returning only once exactly n_messages messages have been received and written into messages, the stream is closed by the other end or by calling nice_agent_remove_stream(), or cancellable is cancelled.

    Any STUN packets received will not be added to messages; instead, they'll be passed for processing to #NiceAgent itself. Since #NiceAgent does not poll for messages on its own, it's therefore essential to keep calling this function for ICE connection establishment to work.

    In the non-error case, in reliable mode, this will block until all buffers in all n_messages have been filled with received data (i.e. messages is treated as a large, flat array of buffers). In non-reliable mode, it will block until n_messages messages have been received, each of which does not have to fill all the buffers in its #NiceInputMessage. In the non-reliable case, each #NiceInputMessage must have enough buffers to contain an entire message (65536 bytes), or any excess data may be silently dropped.

    For each received message, #NiceInputMessage::length will be set to the number of valid bytes stored in the message’s buffers. The bytes are stored sequentially in the buffers; there are no gaps apart from at the end of the buffer array (in non-reliable mode). If non-%NULL on input, #NiceInputMessage::from will have the address of the sending peer stored in it. The base addresses, sizes, and number of buffers in each message will not be modified in any case.

    This must not be used in combination with nice_agent_attach_recv() on the same stream/component pair.

    If the stream/component pair doesn’t exist, or if a suitable candidate socket hasn’t yet been selected for it, a %G_IO_ERROR_BROKEN_PIPE error will be returned. A %G_IO_ERROR_CANCELLED error will be returned if the operation was cancelled. %G_IO_ERROR_FAILED will be returned for other errors.

    Parameters

    • stream_id: number

      the ID of the stream to receive on

    • component_id: number

      the ID of the component to receive on

    • cancellable: Gio.Cancellable

      a #GCancellable to allow the operation to be cancelled from another thread, or %NULL

    Returns [number, Nice.InputMessage[]]

  • Try to receive data from the given stream/component combination on agent, without blocking. If receiving data would block, -1 is returned and %G_IO_ERROR_WOULD_BLOCK is set in error. If any other error occurs, -1 is returned and error is set accordingly. Otherwise, 0 is returned if (and only if) n_messages is 0. In all other cases, the number of valid messages stored in messages is returned, and will be greater than 0.

    This function behaves similarly to nice_agent_recv_messages(), except that it will not block on filling (in reliable mode) or receiving (in non-reliable mode) exactly n_messages messages. In reliable mode, it will receive bytes into messages until it would block; in non-reliable mode, it will receive messages until it would block.

    Any STUN packets received will not be added to messages; instead, they'll be passed for processing to #NiceAgent itself. Since #NiceAgent does not poll for messages on its own, it's therefore essential to keep calling this function for ICE connection establishment to work.

    As this function is non-blocking, cancellable is included only for parity with nice_agent_recv_messages(). If cancellable is cancelled before this function is called, a %G_IO_ERROR_CANCELLED error will be returned immediately.

    This must not be used in combination with nice_agent_attach_recv() on the same stream/component pair.

    Parameters

    • stream_id: number

      the ID of the stream to receive on

    • component_id: number

      the ID of the component to receive on

    • cancellable: Gio.Cancellable

      a #GCancellable to allow the operation to be cancelled from another thread, or %NULL

    Returns [number, Nice.InputMessage[]]

  • recv_nonblocking(stream_id: number, component_id: number, cancellable: Gio.Cancellable): [number, Uint8Array]
  • A single-message version of nice_agent_recv_messages_nonblocking().

    Parameters

    • stream_id: number

      the ID of the stream to receive on

    • component_id: number

      the ID of the component to receive on

    • cancellable: Gio.Cancellable

      a #GCancellable to allow the operation to be cancelled from another thread, or %NULL

    Returns [number, Uint8Array]

  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • remove_stream(stream_id: number): void
  • Remove and free a previously created data stream from agent. If any I/O streams have been created using nice_agent_get_io_stream(), they should be closed completely using g_io_stream_close() before this is called, or they will get broken pipe errors.

    Parameters

    • stream_id: number

      The ID of the stream to remove

    Returns void

  • restart(): boolean
  • Restarts the session as defined in ICE draft 19. This function needs to be called both when initiating (ICE spec section 9.1.1.1. "ICE Restarts"), as well as when reacting (spec section 9.2.1.1. "Detecting ICE Restart") to a restart.

    If consent-freshness has been enabled on agent, as specified in RFC7675 then restarting streams will restore the local consent.

    Returns boolean

  • restart_stream(stream_id: number): boolean
  • Restarts a single stream as defined in RFC 5245. This function needs to be called both when initiating (ICE spec section 9.1.1.1. "ICE Restarts"), as well as when reacting (spec section 9.2.1.1. "Detecting ICE Restart") to a restart.

    Unlike nice_agent_restart(), this applies to a single stream. It also does not generate a new tie breaker.

    If consent-freshness has been enabled on agent, as specified in RFC7675 then restart stream_id will restore the local consent for that stream.

    Parameters

    • stream_id: number

      The ID of the stream

    Returns boolean

  • run_dispose(): void
  • Releases all references to other objects. This can be used to break reference cycles.

    This function should only be called from object system implementations.

    Returns void

  • send(stream_id: number, component_id: number, len: number, buf: string): number
  • Sends a data payload over a stream's component.

    Component state MUST be NICE_COMPONENT_STATE_READY, or as a special case, in any state if component was in READY state before and was then restarted In reliable mode, the -1 error value means either that you are not yet connected or that the send buffer is full (equivalent to EWOULDBLOCK). In both cases, you simply need to wait for the #NiceAgent::reliable-transport-writable signal to be fired before resending the data. In non-reliable mode, it will virtually never happen with UDP sockets, but it might happen if the active candidate is a TURN-TCP connection that got disconnected. In both reliable and non-reliable mode, a -1 error code could also mean that the stream_id and/or component_id are invalid.

    Parameters

    • stream_id: number

      The ID of the stream to send to

    • component_id: number

      The ID of the component to send to

    • len: number

      The length of the buffer to send

    • buf: string

      The buffer of data to send

    Returns number

  • Sends multiple messages on the socket identified by the given stream/component pair. Transmission is non-blocking, so a %G_IO_ERROR_WOULD_BLOCK error may be returned if the send buffer is full.

    As with nice_agent_send(), the given component must be in %NICE_COMPONENT_STATE_READY or, as a special case, in any state if it was previously ready and was then restarted.

    On success, the number of messages written to the socket will be returned, which may be less than n_messages if transmission would have blocked part-way through. Zero will be returned if n_messages is zero, or if transmission would have blocked on the first message.

    In reliable mode, it is instead recommended to use nice_agent_send(). The return value can be less than n_messages or 0 even if it is still possible to send a partial message. In this case, "nice-agent-writable" will never be triggered, so the application would have to use nice_agent_sent() to fill the buffer or have to retry sending at a later point.

    On failure, -1 will be returned and error will be set. If the #NiceAgent is reliable and the socket is not yet connected, %G_IO_ERROR_BROKEN_PIPE will be returned; if the write buffer is full, %G_IO_ERROR_WOULD_BLOCK will be returned. In both cases, wait for the #NiceAgent::reliable-transport-writable signal before trying again. If the given stream_id or component_id are invalid or not yet connected, %G_IO_ERROR_BROKEN_PIPE will be returned. %G_IO_ERROR_FAILED will be returned for other errors.

    Parameters

    • stream_id: number

      the ID of the stream to send to

    • component_id: number

      the ID of the component to send to

    • messages: Nice.OutputMessage[]

      array of messages to send, of at least n_messages entries in length

    • cancellable: Gio.Cancellable

      a #GCancellable to cancel the operation from another thread, or %NULL

    Returns number

  • set_data(key: string, data?: object): void
  • Each object carries around a table of associations from strings to pointers. This function lets you set an association.

    If the object already had an association with that name, the old association will be destroyed.

    Internally, the key is converted to a #GQuark using g_quark_from_string(). This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.

    Parameters

    • key: string

      name of the key

    • Optional data: object

      data to associate with that key

    Returns void

  • set_local_credentials(stream_id: number, ufrag: string, pwd: string): boolean
  • Sets the local credentials for stream stream_id.

    This is only effective before ICE negotiation has started.

    Since 0.1.11

    Parameters

    • stream_id: number

      The ID of the stream

    • ufrag: string

      nul-terminated string containing an ICE username fragment (length must be between 22 and 256 chars)

    • pwd: string

      nul-terminated string containing an ICE password (length must be between 4 and 256 chars)

    Returns boolean

  • set_port_range(stream_id: number, component_id: number, min_port: number, max_port: number): void
  • Sets a preferred port range for allocating host candidates. If a local host candidate cannot be created on that port range, then the nice_agent_gather_candidates() call will fail. This MUST be called before nice_agent_gather_candidates()

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    • min_port: number

      The minimum port to use

    • max_port: number

      The maximum port to use

    Returns void

  • set_property(property_name: string, value?: any): void
  • set_relay_info(stream_id: number, component_id: number, server_ip: string, server_port: number, username: string, password: string, type: RelayType): boolean
  • Sets the settings for using a relay server during the candidate discovery. This may be called multiple times to add multiple relay servers to the discovery process; one TCP and one UDP, for example.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    • server_ip: string

      The IP address of the TURN server

    • server_port: number

      The port of the TURN server

    • username: string

      The TURN username to use for the allocate

    • password: string

      The TURN password to use for the allocate

    • type: RelayType

      The type of relay to use

    Returns boolean

  • set_remote_candidates(stream_id: number, component_id: number, candidates: Nice.Candidate[]): number
  • Sets, adds or updates the remote candidates for a component of a stream.

    NICE_AGENT_MAX_REMOTE_CANDIDATES is the absolute maximum limit for remote candidates. You must first call nice_agent_gather_candidates() and wait for the #NiceAgent::candidate-gathering-done signale before calling nice_agent_set_remote_candidates() Since 0.1.3, there is no need to wait for the candidate-gathering-done signal. Remote candidates can be set even while gathering local candidates. Newly discovered local candidates will automatically be paired with existing remote candidates.

    Parameters

    • stream_id: number

      The ID of the stream the candidates are for

    • component_id: number

      The ID of the component the candidates are for

    • candidates: Nice.Candidate[]

      a #GSList of #NiceCandidate items describing each candidate to add

    Returns number

  • set_remote_credentials(stream_id: number, ufrag: string, pwd: string): boolean
  • Sets the remote credentials for stream stream_id.

    Stream credentials do not override per-candidate credentials if set Due to the native of peer-reflexive candidates, any agent using a per-stream credentials (RFC5245, WLM2009, OC2007R2 and DRAFT19) instead of per-candidate credentials (GOOGLE, MSN, OC2007), must use the nice_agent_set_remote_credentials() API instead of setting the username and password on the candidates.

    Parameters

    • stream_id: number

      The ID of the stream

    • ufrag: string

      nul-terminated string containing an ICE username fragment (length must be between 22 and 256 chars)

    • pwd: string

      nul-terminated string containing an ICE password (length must be between 4 and 256 chars)

    Returns boolean

  • set_selected_pair(stream_id: number, component_id: number, lfoundation: string, rfoundation: string): boolean
  • Sets the selected candidate pair for media transmission for a given stream's component. Calling this function will disable all further ICE processing (connection check, state machine updates, etc). Note that keepalives will continue to be sent.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    • lfoundation: string

      The local foundation of the candidate to use

    • rfoundation: string

      The remote foundation of the candidate to use

    Returns boolean

  • set_selected_remote_candidate(stream_id: number, component_id: number, candidate: Nice.Candidate): boolean
  • Sets the selected remote candidate for media transmission for a given stream's component. This is used to force the selection of a specific remote candidate even when connectivity checks are failing (e.g. non-ICE compatible candidates). Calling this function will disable all further ICE processing (connection check, state machine updates, etc). Note that keepalives will continue to be sent.

    Parameters

    • stream_id: number

      The ID of the stream

    • component_id: number

      The ID of the component

    • candidate: Nice.Candidate

      The #NiceCandidate to select

    Returns boolean

  • set_software(software: string): void
  • This function will set the value of the SOFTWARE attribute to be added to STUN requests, responses and error responses sent during connectivity checks. The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_RFC5245 and #NICE_COMPATIBILITY_WLM2009 compatibility modes.

    The `software` argument will be appended with the libnice version before being sent. The `software` argument must be in UTF-8 encoding and only the first 128 characters will be sent.

    Parameters

    • software: string

      The value of the SOFTWARE attribute to add.

    Returns void

  • set_stream_name(stream_id: number, name: string): boolean
  • This function will assign a media type to a stream. The only values that can be used to produce a valid SDP are: "audio", "video", "text", "application", "image" and "message".

    This is only useful when parsing and generating an SDP of the candidates.

    See also: nice_agent_generate_local_sdp() See also: nice_agent_parse_remote_sdp() See also: nice_agent_get_stream_name()

    Parameters

    • stream_id: number

      The ID of the stream to change

    • name: string

      The new name of the stream or %NULL

    Returns boolean

  • set_stream_tos(stream_id: number, tos: number): void
  • Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options

    Parameters

    • stream_id: number

      The ID of the stream

    • tos: number

      The ToS to set

    Returns void

  • steal_data(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • steal_qdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • thaw_notify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • unref(): void
  • Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

    If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.

    Returns void

  • vfunc_constructed(): void
  • vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: ParamSpec): void
  • vfunc_dispose(): void
  • vfunc_finalize(): void
  • vfunc_get_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    virtual

    Parameters

    Returns void

  • vfunc_set_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • watch_closure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

  • compat_control(what: number, data: object): number
  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • property_name: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Create a new #NiceAgent with parameters that must be be defined at construction time. The returned object must be freed with g_object_unref() See also: #NiceNominationMode and #NiceAgentOption

    Parameters

    Returns Agent

  • Create a new #NiceAgent in reliable mode. If the connectivity is established through ICE-UDP, then a #PseudoTcpSocket will be transparently used to ensure reliability of the messages. The returned object must be freed with g_object_unref() See also: #NiceAgent::reliable-transport-writable

    Parameters

    Returns Agent

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • object_type: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method