Gjsify LogoGjsify Logo

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

Hierarchy

Index

Constructors

Properties

bytestreamTcp: 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

consentFreshness: 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.

controllingMode: 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.

forceRelay: 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().

fullMode: boolean
gTypeInstance: TypeInstance
iceTcp: 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.

iceTrickle: 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.

iceUdp: 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.

idleTimeout: 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.

keepaliveConncheck: 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

mainContext: 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.

maxConnectivityChecks: number
proxyIp: string

The proxy server IP used to bypass a proxy firewall

proxyPassword: string

The password used to authenticate with the proxy

proxyPort: number

The proxy server port used to bypass a proxy firewall

proxyType: number

The type of proxy set in the proxy-ip property

proxyUsername: 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)

stunInitialTimeout: 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).

stunMaxRetransmissions: 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.

stunPacingTimer: number
stunReliableTimeout: number

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

stunServer: string
stunServerPort: number
supportRenomination: 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

upnpTimeout: 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

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

    Parameters

    • nComponents: 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

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: 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

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transformTo: TClosure<any, any>

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

    • transformFrom: 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(sigName: "candidate-gathering-done", callback: Agent_CandidateGatheringDoneSignalCallback): number
  • connect(sigName: "component-state-changed", callback: Agent_ComponentStateChangedSignalCallback): number
  • connect(sigName: "initial-binding-request-received", callback: Agent_InitialBindingRequestReceivedSignalCallback): number
  • connect(sigName: "new-candidate", callback: Agent_NewCandidateSignalCallback): number
  • connect(sigName: "new-candidate-full", callback: Agent_NewCandidateFullSignalCallback): number
  • connect(sigName: "new-remote-candidate", callback: Agent_NewRemoteCandidateSignalCallback): number
  • connect(sigName: "new-remote-candidate-full", callback: Agent_NewRemoteCandidateFullSignalCallback): number
  • connect(sigName: "new-selected-pair", callback: Agent_NewSelectedPairSignalCallback): number
  • connect(sigName: "new-selected-pair-full", callback: Agent_NewSelectedPairFullSignalCallback): number
  • connect(sigName: "reliable-transport-writable", callback: Agent_ReliableTransportWritableSignalCallback): number
  • connect(sigName: "streams-removed", callback: Agent_StreamsRemovedSignalCallback): number
  • connect(sigName: "notify::bytestream-tcp", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::compatibility", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::consent-freshness", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::controlling-mode", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::force-relay", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::full-mode", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::ice-tcp", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::ice-trickle", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::ice-udp", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::idle-timeout", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::keepalive-conncheck", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::main-context", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::max-connectivity-checks", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::proxy-ip", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::proxy-password", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::proxy-port", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::proxy-type", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::proxy-username", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::reliable", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::stun-initial-timeout", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::stun-max-retransmissions", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::stun-pacing-timer", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::stun-reliable-timeout", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::stun-server", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::stun-server-port", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::support-renomination", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::upnp", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::upnp-timeout", callback: ((...args: any[]) => void)): number
  • connect(sigName: string, callback: ((...args: any[]) => void)): number
  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    • sigName: "notify::bytestream-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::compatibility"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::consent-freshness"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::controlling-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::force-relay"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::full-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::ice-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::ice-trickle"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::ice-udp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::idle-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::keepalive-conncheck"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::main-context"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::max-connectivity-checks"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::proxy-ip"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::proxy-password"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::proxy-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::proxy-type"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::proxy-username"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::reliable"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::stun-initial-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::stun-max-retransmissions"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::stun-pacing-timer"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::stun-reliable-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::stun-server"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::stun-server-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::support-renomination"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::upnp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::upnp-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • consentLost(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns boolean

  • emit(sigName: "candidate-gathering-done", ...args: any[]): void
  • emit(sigName: "component-state-changed", componentId: number, state: number, ...args: any[]): void
  • emit(sigName: "initial-binding-request-received", ...args: any[]): void
  • emit(sigName: "new-candidate", componentId: number, foundation: string, ...args: any[]): void
  • emit(sigName: "new-candidate-full", ...args: any[]): void
  • emit(sigName: "new-remote-candidate", componentId: number, foundation: string, ...args: any[]): void
  • emit(sigName: "new-remote-candidate-full", ...args: any[]): void
  • emit(sigName: "new-selected-pair", componentId: number, lfoundation: string, rfoundation: string, ...args: any[]): void
  • emit(sigName: "new-selected-pair-full", componentId: number, lcandidate: Nice.Candidate, rcandidate: Nice.Candidate, ...args: any[]): void
  • emit(sigName: "reliable-transport-writable", componentId: number, ...args: any[]): void
  • emit(sigName: "streams-removed", ...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
  • Parameters

    • sigName: "candidate-gathering-done"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "component-state-changed"
    • componentId: number
    • state: number
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "initial-binding-request-received"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "new-candidate"
    • componentId: number
    • foundation: string
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "new-candidate-full"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "new-remote-candidate"
    • componentId: number
    • foundation: string
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "new-remote-candidate-full"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "new-selected-pair"
    • componentId: number
    • lfoundation: string
    • rfoundation: string
    • Rest ...args: any[]

    Returns void

  • Parameters

    Returns void

  • Parameters

    • sigName: "reliable-transport-writable"
    • componentId: number
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "streams-removed"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::bytestream-tcp"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::compatibility"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::consent-freshness"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::controlling-mode"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::force-relay"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::full-mode"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::ice-tcp"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::ice-trickle"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::ice-udp"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::idle-timeout"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::keepalive-conncheck"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::main-context"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::max-connectivity-checks"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::proxy-ip"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::proxy-password"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::proxy-port"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::proxy-type"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::proxy-username"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::reliable"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::stun-initial-timeout"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::stun-max-retransmissions"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::stun-pacing-timer"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::stun-reliable-timeout"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::stun-server"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::stun-server-port"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::support-renomination"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::upnp"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::upnp-timeout"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: string
    • Rest ...args: any[]

    Returns void

  • forceFloating(): 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

  • forgetRelays(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns boolean

  • freezeNotify(): 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

  • gatherCandidates(streamId: 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

    • streamId: 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

  • generateLocalSdp(): 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

  • generateLocalStreamSdp(streamId: number, includeNonIce: 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

    • streamId: number

      The ID of the stream

    • includeNonIce: boolean

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

    Returns string

  • getComponentState(streamId: number, componentId: number): ComponentState
  • Retrieves the current state of a component.

    Parameters

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns ComponentState

  • getData(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

  • getDefaultLocalCandidate(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns Nice.Candidate

  • getIoStream(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream to wrap

    • componentId: number

      The ID of the component to wrap

    Returns IOStream

  • getLocalCandidates(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns Nice.Candidate[]

  • getLocalCredentials(streamId: 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

    • streamId: number

      The ID of the stream

    Returns [boolean, string, string]

  • getProperty(propertyName?: 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 propertyName: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • getQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • getRemoteCandidates(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns Nice.Candidate[]

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

    Parameters

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    • local: Nice.Candidate

      The local selected candidate

    • remote: Nice.Candidate

      The remote selected candidate

    Returns boolean

  • getSelectedSocket(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns Gio.Socket

  • getSockets(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    Returns Gio.Socket[]

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

    See also: nice_agent_set_stream_name()

    Parameters

    • streamId: 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

  • isFloating(): boolean
  • notify(propertyName: 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

    • propertyName: 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

  • off(sigName: "candidate-gathering-done", callback: Agent_CandidateGatheringDoneSignalCallback): EventEmitter
  • off(sigName: "component-state-changed", callback: Agent_ComponentStateChangedSignalCallback): EventEmitter
  • off(sigName: "initial-binding-request-received", callback: Agent_InitialBindingRequestReceivedSignalCallback): EventEmitter
  • off(sigName: "new-candidate", callback: Agent_NewCandidateSignalCallback): EventEmitter
  • off(sigName: "new-candidate-full", callback: Agent_NewCandidateFullSignalCallback): EventEmitter
  • off(sigName: "new-remote-candidate", callback: Agent_NewRemoteCandidateSignalCallback): EventEmitter
  • off(sigName: "new-remote-candidate-full", callback: Agent_NewRemoteCandidateFullSignalCallback): EventEmitter
  • off(sigName: "new-selected-pair", callback: Agent_NewSelectedPairSignalCallback): EventEmitter
  • off(sigName: "new-selected-pair-full", callback: Agent_NewSelectedPairFullSignalCallback): EventEmitter
  • off(sigName: "reliable-transport-writable", callback: Agent_ReliableTransportWritableSignalCallback): EventEmitter
  • off(sigName: "streams-removed", callback: Agent_StreamsRemovedSignalCallback): EventEmitter
  • off(sigName: "notify::bytestream-tcp", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::compatibility", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::consent-freshness", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::controlling-mode", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::force-relay", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::full-mode", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::ice-tcp", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::ice-trickle", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::ice-udp", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::idle-timeout", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::keepalive-conncheck", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::main-context", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::max-connectivity-checks", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::proxy-ip", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::proxy-password", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::proxy-port", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::proxy-type", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::proxy-username", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::reliable", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::stun-initial-timeout", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::stun-max-retransmissions", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::stun-pacing-timer", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::stun-reliable-timeout", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::stun-server", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::stun-server-port", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::support-renomination", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::upnp", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::upnp-timeout", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: string, callback: ((...args: any[]) => void)): EventEmitter
  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    • sigName: "notify::bytestream-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::compatibility"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::consent-freshness"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::controlling-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::force-relay"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::full-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-trickle"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-udp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::idle-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::keepalive-conncheck"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::main-context"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::max-connectivity-checks"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-ip"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-password"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-type"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-username"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::reliable"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-initial-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-max-retransmissions"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-pacing-timer"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-reliable-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-server"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-server-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::support-renomination"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::upnp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::upnp-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • on(sigName: "candidate-gathering-done", callback: Agent_CandidateGatheringDoneSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "component-state-changed", callback: Agent_ComponentStateChangedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "initial-binding-request-received", callback: Agent_InitialBindingRequestReceivedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "new-candidate", callback: Agent_NewCandidateSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "new-candidate-full", callback: Agent_NewCandidateFullSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "new-remote-candidate", callback: Agent_NewRemoteCandidateSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "new-remote-candidate-full", callback: Agent_NewRemoteCandidateFullSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "new-selected-pair", callback: Agent_NewSelectedPairSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "new-selected-pair-full", callback: Agent_NewSelectedPairFullSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "reliable-transport-writable", callback: Agent_ReliableTransportWritableSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "streams-removed", callback: Agent_StreamsRemovedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "notify::bytestream-tcp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::compatibility", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::consent-freshness", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::controlling-mode", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::force-relay", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::full-mode", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::ice-tcp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::ice-trickle", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::ice-udp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::idle-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::keepalive-conncheck", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::main-context", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::max-connectivity-checks", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::proxy-ip", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::proxy-password", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::proxy-port", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::proxy-type", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::proxy-username", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::reliable", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::stun-initial-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::stun-max-retransmissions", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::stun-pacing-timer", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::stun-reliable-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::stun-server", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::stun-server-port", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::support-renomination", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::upnp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::upnp-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: string, callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    • sigName: "notify::bytestream-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::compatibility"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::consent-freshness"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::controlling-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::force-relay"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::full-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-trickle"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-udp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::idle-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::keepalive-conncheck"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::main-context"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::max-connectivity-checks"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-ip"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-password"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-type"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-username"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::reliable"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-initial-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-max-retransmissions"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-pacing-timer"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-reliable-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-server"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-server-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::support-renomination"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::upnp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::upnp-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • once(sigName: "candidate-gathering-done", callback: Agent_CandidateGatheringDoneSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "component-state-changed", callback: Agent_ComponentStateChangedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "initial-binding-request-received", callback: Agent_InitialBindingRequestReceivedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "new-candidate", callback: Agent_NewCandidateSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "new-candidate-full", callback: Agent_NewCandidateFullSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "new-remote-candidate", callback: Agent_NewRemoteCandidateSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "new-remote-candidate-full", callback: Agent_NewRemoteCandidateFullSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "new-selected-pair", callback: Agent_NewSelectedPairSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "new-selected-pair-full", callback: Agent_NewSelectedPairFullSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "reliable-transport-writable", callback: Agent_ReliableTransportWritableSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "streams-removed", callback: Agent_StreamsRemovedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "notify::bytestream-tcp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::compatibility", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::consent-freshness", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::controlling-mode", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::force-relay", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::full-mode", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::ice-tcp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::ice-trickle", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::ice-udp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::idle-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::keepalive-conncheck", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::main-context", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::max-connectivity-checks", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::proxy-ip", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::proxy-password", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::proxy-port", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::proxy-type", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::proxy-username", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::reliable", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::stun-initial-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::stun-max-retransmissions", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::stun-pacing-timer", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::stun-reliable-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::stun-server", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::stun-server-port", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::support-renomination", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::upnp", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::upnp-timeout", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: string, callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    • sigName: "notify::bytestream-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::compatibility"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::consent-freshness"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::controlling-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::force-relay"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::full-mode"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-tcp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-trickle"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::ice-udp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::idle-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::keepalive-conncheck"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::main-context"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::max-connectivity-checks"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-ip"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-password"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-type"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::proxy-username"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::reliable"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-initial-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-max-retransmissions"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-pacing-timer"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-reliable-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-server"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::stun-server-port"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::support-renomination"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::upnp"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::upnp-timeout"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • parseRemoteCandidateSdp(streamId: 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

    • streamId: number

      The ID of the stream the candidate belongs to

    • sdp: string

      The remote SDP to parse

    Returns Nice.Candidate

  • parseRemoteSdp(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

  • parseRemoteStreamSdp(streamId: 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

    • streamId: 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[]

  • peerCandidateGatheringDone(streamId: 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

    • streamId: number

      The ID of the stream

    Returns boolean

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

    Parameters

    • streamId: number

      the ID of the stream to receive on

    • componentId: 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

    • streamId: number

      the ID of the stream to receive on

    • componentId: 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

    • streamId: number

      the ID of the stream to receive on

    • componentId: 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[]]

  • recvNonblocking(streamId: number, componentId: number, cancellable: Gio.Cancellable): [number, Uint8Array]
  • A single-message version of nice_agent_recv_messages_nonblocking().

    Parameters

    • streamId: number

      the ID of the stream to receive on

    • componentId: 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

  • removeStream(streamId: 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

    • streamId: 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

  • restartStream(streamId: 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

    • streamId: number

      The ID of the stream

    Returns boolean

  • runDispose(): 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(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream to send to

    • componentId: 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

    • streamId: number

      the ID of the stream to send to

    • componentId: 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

  • setData(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

  • setLocalCredentials(streamId: 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

    • streamId: 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

  • setPortRange(streamId: number, componentId: number, minPort: number, maxPort: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    • minPort: number

      The minimum port to use

    • maxPort: number

      The maximum port to use

    Returns void

  • setProperty(propertyName: string, value?: any): void
  • Sets a property on an object.

    Parameters

    • propertyName: string

      the name of the property to set

    • Optional value: any

      the value

    Returns void

  • setRelayInfo(streamId: number, componentId: number, serverIp: string, serverPort: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    • serverIp: string

      The IP address of the TURN server

    • serverPort: 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

  • setRemoteCandidates(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream the candidates are for

    • componentId: 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

  • setRemoteCredentials(streamId: 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

    • streamId: 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

  • setSelectedPair(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: 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

  • setSelectedRemoteCandidate(streamId: number, componentId: 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

    • streamId: number

      The ID of the stream

    • componentId: number

      The ID of the component

    • candidate: Nice.Candidate

      The #NiceCandidate to select

    Returns boolean

  • setSoftware(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

  • setStreamName(streamId: 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

    • streamId: number

      The ID of the stream to change

    • name: string

      The new name of the stream or %NULL

    Returns boolean

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

    Parameters

    • streamId: number

      The ID of the stream

    • tos: number

      The ToS to set

    Returns void

  • stealData(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

  • stealQdata(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

  • thawNotify(): 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

  • watchClosure(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

  • compatControl(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

    • gIface: TypeInterface

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

    • propertyName: 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

    • gIface: 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

    • gIface: TypeInterface

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

    Returns ParamSpec[]

  • Create a new #NiceAgent. The returned object must be freed with g_object_unref()

    Parameters

    Returns Agent

  • 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

    • objectType: 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