@girs/nice-0.1 0.1.0-3.2.6 → 0.1.0-3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/nice-0.1-ambient.js +2 -0
- package/nice-0.1-import.js +3 -0
- package/nice-0.1.d.cts +31 -449
- package/nice-0.1.d.ts +31 -449
- package/package.json +14 -8
package/nice-0.1.d.ts
CHANGED
|
@@ -405,21 +405,21 @@ const CANDIDATE_MAX_TURN_SERVERS: number
|
|
|
405
405
|
* @param transport a #NiceCandidateTransport
|
|
406
406
|
* @returns a static string with the candidate transport
|
|
407
407
|
*/
|
|
408
|
-
function candidate_transport_to_string(transport: CandidateTransport): string
|
|
408
|
+
function candidate_transport_to_string(transport: CandidateTransport): string
|
|
409
409
|
/**
|
|
410
410
|
* Useful for debugging functions, just returns a static string with the
|
|
411
411
|
* candidate type.
|
|
412
412
|
* @param type a #NiceCandidateType
|
|
413
413
|
* @returns a static string with the candidate type
|
|
414
414
|
*/
|
|
415
|
-
function candidate_type_to_string(type: CandidateType): string
|
|
415
|
+
function candidate_type_to_string(type: CandidateType): string
|
|
416
416
|
/**
|
|
417
417
|
* Returns a string representation of the state, generally to use in debug
|
|
418
418
|
* messages.
|
|
419
419
|
* @param state a #NiceComponentState
|
|
420
420
|
* @returns a string representation of @state
|
|
421
421
|
*/
|
|
422
|
-
function component_state_to_string(state: ComponentState): string
|
|
422
|
+
function component_state_to_string(state: ComponentState): string
|
|
423
423
|
/**
|
|
424
424
|
* Disables libnice debug output to the terminal
|
|
425
425
|
* @param with_stun Also disable stun debugging messages
|
|
@@ -569,199 +569,6 @@ module Agent {
|
|
|
569
569
|
* <para> See also: #NiceCompatibility</para>
|
|
570
570
|
*/
|
|
571
571
|
compatibility?: number | null
|
|
572
|
-
/**
|
|
573
|
-
* Whether to perform periodic consent freshness checks as specified in
|
|
574
|
-
* RFC 7675. When %TRUE, the agent will periodically send binding requests
|
|
575
|
-
* to the peer to maintain the consent to send with the peer. On receipt
|
|
576
|
-
* of any authenticated error response, a component will immediately move
|
|
577
|
-
* to the failed state.
|
|
578
|
-
*
|
|
579
|
-
* Setting this property to %TRUE implies that 'keepalive-conncheck' should
|
|
580
|
-
* be %TRUE as well.
|
|
581
|
-
*/
|
|
582
|
-
consent_freshness?: boolean | null
|
|
583
|
-
/**
|
|
584
|
-
* Whether the agent has the controlling role. This property should
|
|
585
|
-
* be modified before gathering candidates, any modification occuring
|
|
586
|
-
* later will be hold until ICE is restarted.
|
|
587
|
-
*/
|
|
588
|
-
controlling_mode?: boolean | null
|
|
589
|
-
/**
|
|
590
|
-
* Force all traffic to go through a relay for added privacy, this
|
|
591
|
-
* allows hiding the local IP address. When this is enabled, so
|
|
592
|
-
* local candidates are available before relay servers have been set
|
|
593
|
-
* with nice_agent_set_relay_info().
|
|
594
|
-
*/
|
|
595
|
-
force_relay?: boolean | null
|
|
596
|
-
full_mode?: boolean | null
|
|
597
|
-
/**
|
|
598
|
-
* Whether the agent should use ICE-TCP when gathering candidates.
|
|
599
|
-
* If the option is disabled, no TCP candidates will be generated. If the
|
|
600
|
-
* agent is in reliable mode, then pseudotcp will need to be used over UDP
|
|
601
|
-
* candidates.
|
|
602
|
-
* <para>
|
|
603
|
-
* This option should be set before gathering candidates and should not be
|
|
604
|
-
* modified afterwards.
|
|
605
|
-
* </para>
|
|
606
|
-
* The #NiceAgent:ice-tcp property can be set at the same time as the
|
|
607
|
-
* #NiceAgent:ice-udp property, but both cannot be unset at the same time.
|
|
608
|
-
* If #NiceAgent:ice-udp is set to %FALSE, then this property cannot be set
|
|
609
|
-
* to %FALSE as well.
|
|
610
|
-
* <note>
|
|
611
|
-
* <para>
|
|
612
|
-
* ICE-TCP is only supported for %NICE_COMPATIBILITY_RFC5245,
|
|
613
|
-
* %NICE_COMPATIBILITY_OC2007 and %NICE_COMPATIBILITY_OC2007R2 compatibility
|
|
614
|
-
* modes.
|
|
615
|
-
* </para>
|
|
616
|
-
* </note>
|
|
617
|
-
*/
|
|
618
|
-
ice_tcp?: boolean | null
|
|
619
|
-
/**
|
|
620
|
-
* Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
|
|
621
|
-
* When %TRUE, the agent will postpone changing a component state to
|
|
622
|
-
* %NICE_COMPONENT_STATE_FAILED until nice_agent_peer_candidate_gathering_done()
|
|
623
|
-
* has been called with the ID of the component's stream.
|
|
624
|
-
*/
|
|
625
|
-
ice_trickle?: boolean | null
|
|
626
|
-
/**
|
|
627
|
-
* Whether the agent should use ICE-UDP when gathering candidates.
|
|
628
|
-
* If the option is disabled, no UDP candidates will be generated. If the
|
|
629
|
-
* agent is in reliable mode, then pseudotcp will not be used since pseudotcp
|
|
630
|
-
* works on top of UDP candidates.
|
|
631
|
-
* <para>
|
|
632
|
-
* This option should be set before gathering candidates and should not be
|
|
633
|
-
* modified afterwards.
|
|
634
|
-
* </para>
|
|
635
|
-
* The #NiceAgent:ice-udp property can be set at the same time as the
|
|
636
|
-
* #NiceAgent:ice-tcp property, but both cannot be unset at the same time.
|
|
637
|
-
* If #NiceAgent:ice-tcp is set to %FALSE, then this property cannot be set
|
|
638
|
-
* to %FALSE as well.
|
|
639
|
-
*/
|
|
640
|
-
ice_udp?: boolean | null
|
|
641
|
-
/**
|
|
642
|
-
* A final timeout in msec, launched when the agent becomes idle,
|
|
643
|
-
* before stopping its activity.
|
|
644
|
-
*
|
|
645
|
-
* This timer will delay the decision to set a component as failed.
|
|
646
|
-
* This delay is added to reduce the chance to see the agent receiving
|
|
647
|
-
* new stun activity just after the conncheck list has been declared
|
|
648
|
-
* failed (some valid pairs, no nominated pair, and no in-progress
|
|
649
|
-
* pairs), reactiviting conncheck activity, and causing a (valid)
|
|
650
|
-
* state transitions like that: connecting -> failed -> connecting ->
|
|
651
|
-
* connected -> ready. Such transitions are not buggy per-se, but may
|
|
652
|
-
* break the test-suite, that counts precisely the number of time each
|
|
653
|
-
* state has been set, and doesnt expect these transcient failed
|
|
654
|
-
* states.
|
|
655
|
-
*
|
|
656
|
-
* This timer is also useful when the agent is in controlled mode and
|
|
657
|
-
* the other controlling peer takes some time to elect its nominated
|
|
658
|
-
* pair (this may be the case for SfB peers).
|
|
659
|
-
*
|
|
660
|
-
* This timer is *NOT* part if the RFC5245, as this situation is not
|
|
661
|
-
* covered in sect 8.1.2 "Updating States", but deals with a real
|
|
662
|
-
* use-case, where a controlled agent can not wait forever for the
|
|
663
|
-
* other peer to make a nomination decision.
|
|
664
|
-
*
|
|
665
|
-
* Also note that the value of this timeout will not delay the
|
|
666
|
-
* emission of 'connected' and 'ready' agent signals, and will not
|
|
667
|
-
* slow down the behaviour of the agent when the peer agent works
|
|
668
|
-
* in a timely manner.
|
|
669
|
-
*/
|
|
670
|
-
idle_timeout?: number | null
|
|
671
|
-
/**
|
|
672
|
-
* Use binding requests as keepalives instead of binding
|
|
673
|
-
* indications. This means that the keepalives may time out which
|
|
674
|
-
* will change the component state to %NICE_COMPONENT_STATE_FAILED.
|
|
675
|
-
*
|
|
676
|
-
* Enabing this is a slight violation of RFC 5245 section 10 which
|
|
677
|
-
* recommends using Binding Indications for keepalives.
|
|
678
|
-
*
|
|
679
|
-
* This is always enabled if the compatibility mode is
|
|
680
|
-
* %NICE_COMPATIBILITY_GOOGLE.
|
|
681
|
-
*
|
|
682
|
-
* This is always enabled if the 'consent-freshness' property is %TRUE
|
|
683
|
-
*/
|
|
684
|
-
keepalive_conncheck?: boolean | null
|
|
685
|
-
/**
|
|
686
|
-
* A GLib main context is needed for all timeouts used by libnice.
|
|
687
|
-
* This is a property being set by the nice_agent_new() call.
|
|
688
|
-
*/
|
|
689
|
-
main_context?: any | null
|
|
690
|
-
max_connectivity_checks?: number | null
|
|
691
|
-
/**
|
|
692
|
-
* The proxy server IP used to bypass a proxy firewall
|
|
693
|
-
*/
|
|
694
|
-
proxy_ip?: string | null
|
|
695
|
-
/**
|
|
696
|
-
* The password used to authenticate with the proxy
|
|
697
|
-
*/
|
|
698
|
-
proxy_password?: string | null
|
|
699
|
-
/**
|
|
700
|
-
* The proxy server port used to bypass a proxy firewall
|
|
701
|
-
*/
|
|
702
|
-
proxy_port?: number | null
|
|
703
|
-
/**
|
|
704
|
-
* The type of proxy set in the proxy-ip property
|
|
705
|
-
*/
|
|
706
|
-
proxy_type?: number | null
|
|
707
|
-
/**
|
|
708
|
-
* The username used to authenticate with the proxy
|
|
709
|
-
*/
|
|
710
|
-
proxy_username?: string | null
|
|
711
|
-
/**
|
|
712
|
-
* Whether the agent is providing a reliable transport of messages (through
|
|
713
|
-
* ICE-TCP or PseudoTCP over ICE-UDP)
|
|
714
|
-
*/
|
|
715
|
-
reliable?: boolean | null
|
|
716
|
-
/**
|
|
717
|
-
* The initial timeout (msecs) of the STUN binding requests
|
|
718
|
-
* used in the gathering stage, to find our local candidates.
|
|
719
|
-
* This property is described as 'RTO' in the RFC 5389 and RFC 5245.
|
|
720
|
-
* This timeout is doubled for each retransmission, until
|
|
721
|
-
* #NiceAgent:stun-max-retransmissions have been done,
|
|
722
|
-
* with an exception for the last restransmission, where the timeout is
|
|
723
|
-
* divided by two instead (RFC 5389 indicates that a customisable
|
|
724
|
-
* multiplier 'Rm' to 'RTO' should be used).
|
|
725
|
-
*/
|
|
726
|
-
stun_initial_timeout?: number | null
|
|
727
|
-
/**
|
|
728
|
-
* The maximum number of retransmissions of the STUN binding requests
|
|
729
|
-
* used in the gathering stage, to find our local candidates, and used
|
|
730
|
-
* in the connection check stage, to test the validity of each
|
|
731
|
-
* constructed pair. This property is described as 'Rc' in the RFC
|
|
732
|
-
* 5389, with a default value of 7. The timeout of each STUN request
|
|
733
|
-
* is doubled for each retransmission, so the choice of this value has
|
|
734
|
-
* a direct impact on the time needed to move from the CONNECTED state
|
|
735
|
-
* to the READY state, and on the time needed to complete the GATHERING
|
|
736
|
-
* state.
|
|
737
|
-
*/
|
|
738
|
-
stun_max_retransmissions?: number | null
|
|
739
|
-
stun_pacing_timer?: number | null
|
|
740
|
-
/**
|
|
741
|
-
* The initial timeout of the STUN binding requests used
|
|
742
|
-
* for a reliable timer.
|
|
743
|
-
*/
|
|
744
|
-
stun_reliable_timeout?: number | null
|
|
745
|
-
stun_server?: string | null
|
|
746
|
-
stun_server_port?: number | null
|
|
747
|
-
/**
|
|
748
|
-
* Support RENOMINATION STUN attribute proposed here:
|
|
749
|
-
* https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
|
|
750
|
-
* soon as RENOMINATION attribute is received from remote
|
|
751
|
-
* candidate's address, corresponding candidates pair gets
|
|
752
|
-
* selected. This is specific to Google Chrome/libWebRTC.
|
|
753
|
-
*/
|
|
754
|
-
support_renomination?: boolean | null
|
|
755
|
-
/**
|
|
756
|
-
* Whether the agent should use UPnP to open a port in the router and
|
|
757
|
-
* get the external IP
|
|
758
|
-
*/
|
|
759
|
-
upnp?: boolean | null
|
|
760
|
-
/**
|
|
761
|
-
* The maximum amount of time (in milliseconds) to wait for UPnP discovery to
|
|
762
|
-
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
763
|
-
*/
|
|
764
|
-
upnp_timeout?: number | null
|
|
765
572
|
/**
|
|
766
573
|
* Whether to perform periodic consent freshness checks as specified in
|
|
767
574
|
* RFC 7675. When %TRUE, the agent will periodically send binding requests
|
|
@@ -901,6 +708,11 @@ module Agent {
|
|
|
901
708
|
* The username used to authenticate with the proxy
|
|
902
709
|
*/
|
|
903
710
|
proxyUsername?: string | null
|
|
711
|
+
/**
|
|
712
|
+
* Whether the agent is providing a reliable transport of messages (through
|
|
713
|
+
* ICE-TCP or PseudoTCP over ICE-UDP)
|
|
714
|
+
*/
|
|
715
|
+
reliable?: boolean | null
|
|
904
716
|
/**
|
|
905
717
|
* The initial timeout (msecs) of the STUN binding requests
|
|
906
718
|
* used in the gathering stage, to find our local candidates.
|
|
@@ -940,6 +752,11 @@ module Agent {
|
|
|
940
752
|
* selected. This is specific to Google Chrome/libWebRTC.
|
|
941
753
|
*/
|
|
942
754
|
supportRenomination?: boolean | null
|
|
755
|
+
/**
|
|
756
|
+
* Whether the agent should use UPnP to open a port in the router and
|
|
757
|
+
* get the external IP
|
|
758
|
+
*/
|
|
759
|
+
upnp?: boolean | null
|
|
943
760
|
/**
|
|
944
761
|
* The maximum amount of time (in milliseconds) to wait for UPnP discovery to
|
|
945
762
|
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
@@ -953,28 +770,6 @@ interface Agent {
|
|
|
953
770
|
|
|
954
771
|
// Own properties of Nice-0.1.Nice.Agent
|
|
955
772
|
|
|
956
|
-
/**
|
|
957
|
-
* This property defines whether receive/send over a TCP or pseudo-TCP, in
|
|
958
|
-
* reliable mode, are considered as packetized or as bytestream.
|
|
959
|
-
* In unreliable mode, every send/recv is considered as packetized, and
|
|
960
|
-
* this property is ignored and cannot be set.
|
|
961
|
-
* <para>
|
|
962
|
-
* In reliable mode, this property will always return %TRUE in the
|
|
963
|
-
* %NICE_COMPATIBILITY_GOOGLE compatibility mode.
|
|
964
|
-
* </para>
|
|
965
|
-
* If the property is %TRUE, the stream is considered in bytestream mode
|
|
966
|
-
* and data can be read with any receive size. If the property is %FALSE, then
|
|
967
|
-
* the stream is considred packetized and each receive will return one packet
|
|
968
|
-
* of the same size as what was sent from the peer. If in packetized mode,
|
|
969
|
-
* then doing a receive with a size smaller than the packet, will cause the
|
|
970
|
-
* remaining bytes in the packet to be dropped, breaking the reliability
|
|
971
|
-
* of the stream.
|
|
972
|
-
* <para>
|
|
973
|
-
* This property is currently read-only, and will become read/write once
|
|
974
|
-
* bytestream mode will be supported.
|
|
975
|
-
* </para>
|
|
976
|
-
*/
|
|
977
|
-
readonly bytestream_tcp: boolean
|
|
978
773
|
/**
|
|
979
774
|
* This property defines whether receive/send over a TCP or pseudo-TCP, in
|
|
980
775
|
* reliable mode, are considered as packetized or as bytestream.
|
|
@@ -1003,17 +798,6 @@ interface Agent {
|
|
|
1003
798
|
* <para> See also: #NiceCompatibility</para>
|
|
1004
799
|
*/
|
|
1005
800
|
readonly compatibility: number
|
|
1006
|
-
/**
|
|
1007
|
-
* Whether to perform periodic consent freshness checks as specified in
|
|
1008
|
-
* RFC 7675. When %TRUE, the agent will periodically send binding requests
|
|
1009
|
-
* to the peer to maintain the consent to send with the peer. On receipt
|
|
1010
|
-
* of any authenticated error response, a component will immediately move
|
|
1011
|
-
* to the failed state.
|
|
1012
|
-
*
|
|
1013
|
-
* Setting this property to %TRUE implies that 'keepalive-conncheck' should
|
|
1014
|
-
* be %TRUE as well.
|
|
1015
|
-
*/
|
|
1016
|
-
readonly consent_freshness: boolean
|
|
1017
801
|
/**
|
|
1018
802
|
* Whether to perform periodic consent freshness checks as specified in
|
|
1019
803
|
* RFC 7675. When %TRUE, the agent will periodically send binding requests
|
|
@@ -1025,25 +809,12 @@ interface Agent {
|
|
|
1025
809
|
* be %TRUE as well.
|
|
1026
810
|
*/
|
|
1027
811
|
readonly consentFreshness: boolean
|
|
1028
|
-
/**
|
|
1029
|
-
* Whether the agent has the controlling role. This property should
|
|
1030
|
-
* be modified before gathering candidates, any modification occuring
|
|
1031
|
-
* later will be hold until ICE is restarted.
|
|
1032
|
-
*/
|
|
1033
|
-
controlling_mode: boolean
|
|
1034
812
|
/**
|
|
1035
813
|
* Whether the agent has the controlling role. This property should
|
|
1036
814
|
* be modified before gathering candidates, any modification occuring
|
|
1037
815
|
* later will be hold until ICE is restarted.
|
|
1038
816
|
*/
|
|
1039
817
|
controllingMode: boolean
|
|
1040
|
-
/**
|
|
1041
|
-
* Force all traffic to go through a relay for added privacy, this
|
|
1042
|
-
* allows hiding the local IP address. When this is enabled, so
|
|
1043
|
-
* local candidates are available before relay servers have been set
|
|
1044
|
-
* with nice_agent_set_relay_info().
|
|
1045
|
-
*/
|
|
1046
|
-
force_relay: boolean
|
|
1047
818
|
/**
|
|
1048
819
|
* Force all traffic to go through a relay for added privacy, this
|
|
1049
820
|
* allows hiding the local IP address. When this is enabled, so
|
|
@@ -1051,30 +822,7 @@ interface Agent {
|
|
|
1051
822
|
* with nice_agent_set_relay_info().
|
|
1052
823
|
*/
|
|
1053
824
|
forceRelay: boolean
|
|
1054
|
-
readonly full_mode: boolean
|
|
1055
825
|
readonly fullMode: boolean
|
|
1056
|
-
/**
|
|
1057
|
-
* Whether the agent should use ICE-TCP when gathering candidates.
|
|
1058
|
-
* If the option is disabled, no TCP candidates will be generated. If the
|
|
1059
|
-
* agent is in reliable mode, then pseudotcp will need to be used over UDP
|
|
1060
|
-
* candidates.
|
|
1061
|
-
* <para>
|
|
1062
|
-
* This option should be set before gathering candidates and should not be
|
|
1063
|
-
* modified afterwards.
|
|
1064
|
-
* </para>
|
|
1065
|
-
* The #NiceAgent:ice-tcp property can be set at the same time as the
|
|
1066
|
-
* #NiceAgent:ice-udp property, but both cannot be unset at the same time.
|
|
1067
|
-
* If #NiceAgent:ice-udp is set to %FALSE, then this property cannot be set
|
|
1068
|
-
* to %FALSE as well.
|
|
1069
|
-
* <note>
|
|
1070
|
-
* <para>
|
|
1071
|
-
* ICE-TCP is only supported for %NICE_COMPATIBILITY_RFC5245,
|
|
1072
|
-
* %NICE_COMPATIBILITY_OC2007 and %NICE_COMPATIBILITY_OC2007R2 compatibility
|
|
1073
|
-
* modes.
|
|
1074
|
-
* </para>
|
|
1075
|
-
* </note>
|
|
1076
|
-
*/
|
|
1077
|
-
ice_tcp: boolean
|
|
1078
826
|
/**
|
|
1079
827
|
* Whether the agent should use ICE-TCP when gathering candidates.
|
|
1080
828
|
* If the option is disabled, no TCP candidates will be generated. If the
|
|
@@ -1097,13 +845,6 @@ interface Agent {
|
|
|
1097
845
|
* </note>
|
|
1098
846
|
*/
|
|
1099
847
|
iceTcp: boolean
|
|
1100
|
-
/**
|
|
1101
|
-
* Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
|
|
1102
|
-
* When %TRUE, the agent will postpone changing a component state to
|
|
1103
|
-
* %NICE_COMPONENT_STATE_FAILED until nice_agent_peer_candidate_gathering_done()
|
|
1104
|
-
* has been called with the ID of the component's stream.
|
|
1105
|
-
*/
|
|
1106
|
-
ice_trickle: boolean
|
|
1107
848
|
/**
|
|
1108
849
|
* Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
|
|
1109
850
|
* When %TRUE, the agent will postpone changing a component state to
|
|
@@ -1111,21 +852,6 @@ interface Agent {
|
|
|
1111
852
|
* has been called with the ID of the component's stream.
|
|
1112
853
|
*/
|
|
1113
854
|
iceTrickle: boolean
|
|
1114
|
-
/**
|
|
1115
|
-
* Whether the agent should use ICE-UDP when gathering candidates.
|
|
1116
|
-
* If the option is disabled, no UDP candidates will be generated. If the
|
|
1117
|
-
* agent is in reliable mode, then pseudotcp will not be used since pseudotcp
|
|
1118
|
-
* works on top of UDP candidates.
|
|
1119
|
-
* <para>
|
|
1120
|
-
* This option should be set before gathering candidates and should not be
|
|
1121
|
-
* modified afterwards.
|
|
1122
|
-
* </para>
|
|
1123
|
-
* The #NiceAgent:ice-udp property can be set at the same time as the
|
|
1124
|
-
* #NiceAgent:ice-tcp property, but both cannot be unset at the same time.
|
|
1125
|
-
* If #NiceAgent:ice-tcp is set to %FALSE, then this property cannot be set
|
|
1126
|
-
* to %FALSE as well.
|
|
1127
|
-
*/
|
|
1128
|
-
ice_udp: boolean
|
|
1129
855
|
/**
|
|
1130
856
|
* Whether the agent should use ICE-UDP when gathering candidates.
|
|
1131
857
|
* If the option is disabled, no UDP candidates will be generated. If the
|
|
@@ -1141,36 +867,6 @@ interface Agent {
|
|
|
1141
867
|
* to %FALSE as well.
|
|
1142
868
|
*/
|
|
1143
869
|
iceUdp: boolean
|
|
1144
|
-
/**
|
|
1145
|
-
* A final timeout in msec, launched when the agent becomes idle,
|
|
1146
|
-
* before stopping its activity.
|
|
1147
|
-
*
|
|
1148
|
-
* This timer will delay the decision to set a component as failed.
|
|
1149
|
-
* This delay is added to reduce the chance to see the agent receiving
|
|
1150
|
-
* new stun activity just after the conncheck list has been declared
|
|
1151
|
-
* failed (some valid pairs, no nominated pair, and no in-progress
|
|
1152
|
-
* pairs), reactiviting conncheck activity, and causing a (valid)
|
|
1153
|
-
* state transitions like that: connecting -> failed -> connecting ->
|
|
1154
|
-
* connected -> ready. Such transitions are not buggy per-se, but may
|
|
1155
|
-
* break the test-suite, that counts precisely the number of time each
|
|
1156
|
-
* state has been set, and doesnt expect these transcient failed
|
|
1157
|
-
* states.
|
|
1158
|
-
*
|
|
1159
|
-
* This timer is also useful when the agent is in controlled mode and
|
|
1160
|
-
* the other controlling peer takes some time to elect its nominated
|
|
1161
|
-
* pair (this may be the case for SfB peers).
|
|
1162
|
-
*
|
|
1163
|
-
* This timer is *NOT* part if the RFC5245, as this situation is not
|
|
1164
|
-
* covered in sect 8.1.2 "Updating States", but deals with a real
|
|
1165
|
-
* use-case, where a controlled agent can not wait forever for the
|
|
1166
|
-
* other peer to make a nomination decision.
|
|
1167
|
-
*
|
|
1168
|
-
* Also note that the value of this timeout will not delay the
|
|
1169
|
-
* emission of 'connected' and 'ready' agent signals, and will not
|
|
1170
|
-
* slow down the behaviour of the agent when the peer agent works
|
|
1171
|
-
* in a timely manner.
|
|
1172
|
-
*/
|
|
1173
|
-
idle_timeout: number
|
|
1174
870
|
/**
|
|
1175
871
|
* A final timeout in msec, launched when the agent becomes idle,
|
|
1176
872
|
* before stopping its activity.
|
|
@@ -1201,20 +897,6 @@ interface Agent {
|
|
|
1201
897
|
* in a timely manner.
|
|
1202
898
|
*/
|
|
1203
899
|
idleTimeout: number
|
|
1204
|
-
/**
|
|
1205
|
-
* Use binding requests as keepalives instead of binding
|
|
1206
|
-
* indications. This means that the keepalives may time out which
|
|
1207
|
-
* will change the component state to %NICE_COMPONENT_STATE_FAILED.
|
|
1208
|
-
*
|
|
1209
|
-
* Enabing this is a slight violation of RFC 5245 section 10 which
|
|
1210
|
-
* recommends using Binding Indications for keepalives.
|
|
1211
|
-
*
|
|
1212
|
-
* This is always enabled if the compatibility mode is
|
|
1213
|
-
* %NICE_COMPATIBILITY_GOOGLE.
|
|
1214
|
-
*
|
|
1215
|
-
* This is always enabled if the 'consent-freshness' property is %TRUE
|
|
1216
|
-
*/
|
|
1217
|
-
keepalive_conncheck: boolean
|
|
1218
900
|
/**
|
|
1219
901
|
* Use binding requests as keepalives instead of binding
|
|
1220
902
|
* indications. This means that the keepalives may time out which
|
|
@@ -1229,54 +911,28 @@ interface Agent {
|
|
|
1229
911
|
* This is always enabled if the 'consent-freshness' property is %TRUE
|
|
1230
912
|
*/
|
|
1231
913
|
keepaliveConncheck: boolean
|
|
1232
|
-
/**
|
|
1233
|
-
* A GLib main context is needed for all timeouts used by libnice.
|
|
1234
|
-
* This is a property being set by the nice_agent_new() call.
|
|
1235
|
-
*/
|
|
1236
|
-
readonly main_context: any
|
|
1237
914
|
/**
|
|
1238
915
|
* A GLib main context is needed for all timeouts used by libnice.
|
|
1239
916
|
* This is a property being set by the nice_agent_new() call.
|
|
1240
917
|
*/
|
|
1241
918
|
readonly mainContext: any
|
|
1242
|
-
max_connectivity_checks: number
|
|
1243
919
|
maxConnectivityChecks: number
|
|
1244
|
-
/**
|
|
1245
|
-
* The proxy server IP used to bypass a proxy firewall
|
|
1246
|
-
*/
|
|
1247
|
-
proxy_ip: string | null
|
|
1248
920
|
/**
|
|
1249
921
|
* The proxy server IP used to bypass a proxy firewall
|
|
1250
922
|
*/
|
|
1251
923
|
proxyIp: string | null
|
|
1252
|
-
/**
|
|
1253
|
-
* The password used to authenticate with the proxy
|
|
1254
|
-
*/
|
|
1255
|
-
proxy_password: string | null
|
|
1256
924
|
/**
|
|
1257
925
|
* The password used to authenticate with the proxy
|
|
1258
926
|
*/
|
|
1259
927
|
proxyPassword: string | null
|
|
1260
|
-
/**
|
|
1261
|
-
* The proxy server port used to bypass a proxy firewall
|
|
1262
|
-
*/
|
|
1263
|
-
proxy_port: number
|
|
1264
928
|
/**
|
|
1265
929
|
* The proxy server port used to bypass a proxy firewall
|
|
1266
930
|
*/
|
|
1267
931
|
proxyPort: number
|
|
1268
|
-
/**
|
|
1269
|
-
* The type of proxy set in the proxy-ip property
|
|
1270
|
-
*/
|
|
1271
|
-
proxy_type: number
|
|
1272
932
|
/**
|
|
1273
933
|
* The type of proxy set in the proxy-ip property
|
|
1274
934
|
*/
|
|
1275
935
|
proxyType: number
|
|
1276
|
-
/**
|
|
1277
|
-
* The username used to authenticate with the proxy
|
|
1278
|
-
*/
|
|
1279
|
-
proxy_username: string | null
|
|
1280
936
|
/**
|
|
1281
937
|
* The username used to authenticate with the proxy
|
|
1282
938
|
*/
|
|
@@ -1286,17 +942,6 @@ interface Agent {
|
|
|
1286
942
|
* ICE-TCP or PseudoTCP over ICE-UDP)
|
|
1287
943
|
*/
|
|
1288
944
|
readonly reliable: boolean
|
|
1289
|
-
/**
|
|
1290
|
-
* The initial timeout (msecs) of the STUN binding requests
|
|
1291
|
-
* used in the gathering stage, to find our local candidates.
|
|
1292
|
-
* This property is described as 'RTO' in the RFC 5389 and RFC 5245.
|
|
1293
|
-
* This timeout is doubled for each retransmission, until
|
|
1294
|
-
* #NiceAgent:stun-max-retransmissions have been done,
|
|
1295
|
-
* with an exception for the last restransmission, where the timeout is
|
|
1296
|
-
* divided by two instead (RFC 5389 indicates that a customisable
|
|
1297
|
-
* multiplier 'Rm' to 'RTO' should be used).
|
|
1298
|
-
*/
|
|
1299
|
-
stun_initial_timeout: number
|
|
1300
945
|
/**
|
|
1301
946
|
* The initial timeout (msecs) of the STUN binding requests
|
|
1302
947
|
* used in the gathering stage, to find our local candidates.
|
|
@@ -1308,18 +953,6 @@ interface Agent {
|
|
|
1308
953
|
* multiplier 'Rm' to 'RTO' should be used).
|
|
1309
954
|
*/
|
|
1310
955
|
stunInitialTimeout: number
|
|
1311
|
-
/**
|
|
1312
|
-
* The maximum number of retransmissions of the STUN binding requests
|
|
1313
|
-
* used in the gathering stage, to find our local candidates, and used
|
|
1314
|
-
* in the connection check stage, to test the validity of each
|
|
1315
|
-
* constructed pair. This property is described as 'Rc' in the RFC
|
|
1316
|
-
* 5389, with a default value of 7. The timeout of each STUN request
|
|
1317
|
-
* is doubled for each retransmission, so the choice of this value has
|
|
1318
|
-
* a direct impact on the time needed to move from the CONNECTED state
|
|
1319
|
-
* to the READY state, and on the time needed to complete the GATHERING
|
|
1320
|
-
* state.
|
|
1321
|
-
*/
|
|
1322
|
-
stun_max_retransmissions: number
|
|
1323
956
|
/**
|
|
1324
957
|
* The maximum number of retransmissions of the STUN binding requests
|
|
1325
958
|
* used in the gathering stage, to find our local candidates, and used
|
|
@@ -1332,30 +965,14 @@ interface Agent {
|
|
|
1332
965
|
* state.
|
|
1333
966
|
*/
|
|
1334
967
|
stunMaxRetransmissions: number
|
|
1335
|
-
stun_pacing_timer: number
|
|
1336
968
|
stunPacingTimer: number
|
|
1337
|
-
/**
|
|
1338
|
-
* The initial timeout of the STUN binding requests used
|
|
1339
|
-
* for a reliable timer.
|
|
1340
|
-
*/
|
|
1341
|
-
stun_reliable_timeout: number
|
|
1342
969
|
/**
|
|
1343
970
|
* The initial timeout of the STUN binding requests used
|
|
1344
971
|
* for a reliable timer.
|
|
1345
972
|
*/
|
|
1346
973
|
stunReliableTimeout: number
|
|
1347
|
-
stun_server: string | null
|
|
1348
974
|
stunServer: string | null
|
|
1349
|
-
stun_server_port: number
|
|
1350
975
|
stunServerPort: number
|
|
1351
|
-
/**
|
|
1352
|
-
* Support RENOMINATION STUN attribute proposed here:
|
|
1353
|
-
* https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
|
|
1354
|
-
* soon as RENOMINATION attribute is received from remote
|
|
1355
|
-
* candidate's address, corresponding candidates pair gets
|
|
1356
|
-
* selected. This is specific to Google Chrome/libWebRTC.
|
|
1357
|
-
*/
|
|
1358
|
-
support_renomination: boolean
|
|
1359
976
|
/**
|
|
1360
977
|
* Support RENOMINATION STUN attribute proposed here:
|
|
1361
978
|
* https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
|
|
@@ -1369,11 +986,6 @@ interface Agent {
|
|
|
1369
986
|
* get the external IP
|
|
1370
987
|
*/
|
|
1371
988
|
upnp: boolean
|
|
1372
|
-
/**
|
|
1373
|
-
* The maximum amount of time (in milliseconds) to wait for UPnP discovery to
|
|
1374
|
-
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
1375
|
-
*/
|
|
1376
|
-
upnp_timeout: number
|
|
1377
989
|
/**
|
|
1378
990
|
* The maximum amount of time (in milliseconds) to wait for UPnP discovery to
|
|
1379
991
|
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
@@ -1655,7 +1267,7 @@ interface Agent {
|
|
|
1655
1267
|
* @param stream_id The ID of the stream to change
|
|
1656
1268
|
* @returns The name of the stream. The name is only valid while the stream exists or until it changes through a call to nice_agent_set_stream_name().
|
|
1657
1269
|
*/
|
|
1658
|
-
get_stream_name(stream_id: number): string
|
|
1270
|
+
get_stream_name(stream_id: number): string
|
|
1659
1271
|
/**
|
|
1660
1272
|
* Parse an SDP string and extracts the candidate from it.
|
|
1661
1273
|
*
|
|
@@ -1666,7 +1278,7 @@ interface Agent {
|
|
|
1666
1278
|
* @param sdp The remote SDP to parse
|
|
1667
1279
|
* @returns The parsed candidate or %NULL if there was an error.
|
|
1668
1280
|
*/
|
|
1669
|
-
parse_remote_candidate_sdp(stream_id: number, sdp: string
|
|
1281
|
+
parse_remote_candidate_sdp(stream_id: number, sdp: string): Candidate
|
|
1670
1282
|
/**
|
|
1671
1283
|
* Parse an SDP string and extracts candidates and credentials from it and sets
|
|
1672
1284
|
* them on the agent.
|
|
@@ -1678,7 +1290,7 @@ interface Agent {
|
|
|
1678
1290
|
* @param sdp The remote SDP to parse
|
|
1679
1291
|
* @returns The number of candidates added, negative on errors
|
|
1680
1292
|
*/
|
|
1681
|
-
parse_remote_sdp(sdp: string
|
|
1293
|
+
parse_remote_sdp(sdp: string): number
|
|
1682
1294
|
/**
|
|
1683
1295
|
* Parse an SDP string representing a single stream and extracts candidates
|
|
1684
1296
|
* and credentials from it.
|
|
@@ -1692,7 +1304,7 @@ interface Agent {
|
|
|
1692
1304
|
* @param pwd Pointer to store the ice password if non %NULL. Must be freed with g_free() after use
|
|
1693
1305
|
* @returns A #GSList of candidates parsed from the SDP, or %NULL in case of errors
|
|
1694
1306
|
*/
|
|
1695
|
-
parse_remote_stream_sdp(stream_id: number, sdp: string
|
|
1307
|
+
parse_remote_stream_sdp(stream_id: number, sdp: string, ufrag: string | null, pwd: string | null): Candidate[]
|
|
1696
1308
|
/**
|
|
1697
1309
|
* Notifies the agent that the remote peer has concluded candidate gathering and
|
|
1698
1310
|
* thus no more remote candidates are expected to arrive for `stream_id`.
|
|
@@ -1859,7 +1471,7 @@ interface Agent {
|
|
|
1859
1471
|
* @param buf The buffer of data to send
|
|
1860
1472
|
* @returns The number of bytes sent, or negative error code
|
|
1861
1473
|
*/
|
|
1862
|
-
send(stream_id: number, component_id: number, len: number, buf: string
|
|
1474
|
+
send(stream_id: number, component_id: number, len: number, buf: string): number
|
|
1863
1475
|
/**
|
|
1864
1476
|
* Sends multiple messages on the socket identified by the given
|
|
1865
1477
|
* stream/component pair. Transmission is non-blocking, so a
|
|
@@ -1910,7 +1522,7 @@ interface Agent {
|
|
|
1910
1522
|
* @param pwd nul-terminated string containing an ICE password (length must be between 4 and 256 chars)
|
|
1911
1523
|
* @returns %TRUE on success, %FALSE on error.
|
|
1912
1524
|
*/
|
|
1913
|
-
set_local_credentials(stream_id: number, ufrag: string
|
|
1525
|
+
set_local_credentials(stream_id: number, ufrag: string, pwd: string): boolean
|
|
1914
1526
|
/**
|
|
1915
1527
|
* Sets a preferred port range for allocating host candidates.
|
|
1916
1528
|
* <para>
|
|
@@ -1939,7 +1551,7 @@ interface Agent {
|
|
|
1939
1551
|
* @param type The type of relay to use
|
|
1940
1552
|
* @returns %TRUE if the TURN settings were accepted. %FALSE if the address was invalid.
|
|
1941
1553
|
*/
|
|
1942
|
-
set_relay_info(stream_id: number, component_id: number, server_ip: string
|
|
1554
|
+
set_relay_info(stream_id: number, component_id: number, server_ip: string, server_port: number, username: string, password: string, type: RelayType): boolean
|
|
1943
1555
|
/**
|
|
1944
1556
|
* Sets, adds or updates the remote candidates for a component of a stream.
|
|
1945
1557
|
*
|
|
@@ -1986,7 +1598,7 @@ interface Agent {
|
|
|
1986
1598
|
* @param pwd nul-terminated string containing an ICE password (length must be between 4 and 256 chars)
|
|
1987
1599
|
* @returns %TRUE on success, %FALSE on error.
|
|
1988
1600
|
*/
|
|
1989
|
-
set_remote_credentials(stream_id: number, ufrag: string
|
|
1601
|
+
set_remote_credentials(stream_id: number, ufrag: string, pwd: string): boolean
|
|
1990
1602
|
/**
|
|
1991
1603
|
* Sets the selected candidate pair for media transmission
|
|
1992
1604
|
* for a given stream's component. Calling this function will
|
|
@@ -1999,7 +1611,7 @@ interface Agent {
|
|
|
1999
1611
|
* @param rfoundation The remote foundation of the candidate to use
|
|
2000
1612
|
* @returns %TRUE on success, %FALSE if the candidate pair cannot be found
|
|
2001
1613
|
*/
|
|
2002
|
-
set_selected_pair(stream_id: number, component_id: number, lfoundation: string
|
|
1614
|
+
set_selected_pair(stream_id: number, component_id: number, lfoundation: string, rfoundation: string): boolean
|
|
2003
1615
|
/**
|
|
2004
1616
|
* Sets the selected remote candidate for media transmission
|
|
2005
1617
|
* for a given stream's component. This is used to force the selection of
|
|
@@ -2034,7 +1646,7 @@ interface Agent {
|
|
|
2034
1646
|
* </note>
|
|
2035
1647
|
* @param software The value of the SOFTWARE attribute to add.
|
|
2036
1648
|
*/
|
|
2037
|
-
set_software(software: string
|
|
1649
|
+
set_software(software: string): void
|
|
2038
1650
|
/**
|
|
2039
1651
|
* This function will assign a media type to a stream. The only values
|
|
2040
1652
|
* that can be used to produce a valid SDP are: "audio", "video",
|
|
@@ -2050,7 +1662,7 @@ interface Agent {
|
|
|
2050
1662
|
* @param name The new name of the stream or %NULL
|
|
2051
1663
|
* @returns %TRUE if the name has been set. %FALSE in case of error (invalid stream or duplicate name).
|
|
2052
1664
|
*/
|
|
2053
|
-
set_stream_name(stream_id: number, name: string
|
|
1665
|
+
set_stream_name(stream_id: number, name: string): boolean
|
|
2054
1666
|
/**
|
|
2055
1667
|
* Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options
|
|
2056
1668
|
* @param stream_id The ID of the stream
|
|
@@ -2254,24 +1866,9 @@ module PseudoTcpSocket {
|
|
|
2254
1866
|
|
|
2255
1867
|
// Own constructor properties of Nice-0.1.Nice.PseudoTcpSocket
|
|
2256
1868
|
|
|
2257
|
-
|
|
1869
|
+
ackDelay?: number | null
|
|
2258
1870
|
callbacks?: any | null
|
|
2259
1871
|
conversation?: number | null
|
|
2260
|
-
no_delay?: boolean | null
|
|
2261
|
-
rcv_buf?: number | null
|
|
2262
|
-
snd_buf?: number | null
|
|
2263
|
-
/**
|
|
2264
|
-
* Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
|
|
2265
|
-
* this socket. The extension is only compatible with other libnice pseudo-TCP
|
|
2266
|
-
* stacks, and not with Jingle pseudo-TCP stacks. If enabled, support is
|
|
2267
|
-
* negotiatied on connection setup, so it is safe for a #PseudoTcpSocket with
|
|
2268
|
-
* support enabled to be used with one with it disabled, or with a Jingle
|
|
2269
|
-
* pseudo-TCP socket which doesn’t support it at all.
|
|
2270
|
-
*
|
|
2271
|
-
* Support is enabled by default.
|
|
2272
|
-
*/
|
|
2273
|
-
support_fin_ack?: boolean | null
|
|
2274
|
-
ackDelay?: number | null
|
|
2275
1872
|
noDelay?: boolean | null
|
|
2276
1873
|
rcvBuf?: number | null
|
|
2277
1874
|
sndBuf?: number | null
|
|
@@ -2294,28 +1891,13 @@ interface PseudoTcpSocket {
|
|
|
2294
1891
|
|
|
2295
1892
|
// Own properties of Nice-0.1.Nice.PseudoTcpSocket
|
|
2296
1893
|
|
|
2297
|
-
ack_delay: number
|
|
2298
1894
|
ackDelay: number
|
|
2299
1895
|
callbacks: any
|
|
2300
1896
|
readonly conversation: number
|
|
2301
|
-
no_delay: boolean
|
|
2302
1897
|
noDelay: boolean
|
|
2303
|
-
rcv_buf: number
|
|
2304
1898
|
rcvBuf: number
|
|
2305
|
-
snd_buf: number
|
|
2306
1899
|
sndBuf: number
|
|
2307
1900
|
readonly state: number
|
|
2308
|
-
/**
|
|
2309
|
-
* Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
|
|
2310
|
-
* this socket. The extension is only compatible with other libnice pseudo-TCP
|
|
2311
|
-
* stacks, and not with Jingle pseudo-TCP stacks. If enabled, support is
|
|
2312
|
-
* negotiatied on connection setup, so it is safe for a #PseudoTcpSocket with
|
|
2313
|
-
* support enabled to be used with one with it disabled, or with a Jingle
|
|
2314
|
-
* pseudo-TCP socket which doesn’t support it at all.
|
|
2315
|
-
*
|
|
2316
|
-
* Support is enabled by default.
|
|
2317
|
-
*/
|
|
2318
|
-
readonly support_fin_ack: boolean
|
|
2319
1901
|
/**
|
|
2320
1902
|
* Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
|
|
2321
1903
|
* this socket. The extension is only compatible with other libnice pseudo-TCP
|
|
@@ -2445,7 +2027,7 @@ interface PseudoTcpSocket {
|
|
|
2445
2027
|
* @param len The length of `buffer`
|
|
2446
2028
|
* @returns %TRUE if the packet was processed successfully, %FALSE otherwise
|
|
2447
2029
|
*/
|
|
2448
|
-
notify_packet(buffer: string
|
|
2030
|
+
notify_packet(buffer: string, len: number): boolean
|
|
2449
2031
|
/**
|
|
2450
2032
|
* Receive data from the socket.
|
|
2451
2033
|
*
|
|
@@ -2478,7 +2060,7 @@ interface PseudoTcpSocket {
|
|
|
2478
2060
|
* @param len The length of `buffer`
|
|
2479
2061
|
* @returns The number of bytes sent or -1 in case of error <para> See also: pseudo_tcp_socket_get_error() </para>
|
|
2480
2062
|
*/
|
|
2481
|
-
send(buffer: string
|
|
2063
|
+
send(buffer: string, len: number): number
|
|
2482
2064
|
/**
|
|
2483
2065
|
* Sets the current monotonic time to be used by the TCP socket when calculating
|
|
2484
2066
|
* timeouts and expiry times. If this function is not called, or is called with
|
|
@@ -2653,7 +2235,7 @@ interface Address {
|
|
|
2653
2235
|
* @param str The string to set
|
|
2654
2236
|
* @returns %TRUE if success, %FALSE on error
|
|
2655
2237
|
*/
|
|
2656
|
-
set_from_string(str: string
|
|
2238
|
+
set_from_string(str: string): boolean
|
|
2657
2239
|
/**
|
|
2658
2240
|
* Set `addr` to an IPv4 address using the data from `addr_ipv4`
|
|
2659
2241
|
*
|
|
@@ -2832,14 +2414,14 @@ class Candidate {
|
|
|
2832
2414
|
* @param transport a #NiceCandidateTransport
|
|
2833
2415
|
* @returns a static string with the candidate transport
|
|
2834
2416
|
*/
|
|
2835
|
-
static transport_to_string(transport: CandidateTransport): string
|
|
2417
|
+
static transport_to_string(transport: CandidateTransport): string
|
|
2836
2418
|
/**
|
|
2837
2419
|
* Useful for debugging functions, just returns a static string with the
|
|
2838
2420
|
* candidate type.
|
|
2839
2421
|
* @param type a #NiceCandidateType
|
|
2840
2422
|
* @returns a static string with the candidate type
|
|
2841
2423
|
*/
|
|
2842
|
-
static type_to_string(type: CandidateType): string
|
|
2424
|
+
static type_to_string(type: CandidateType): string
|
|
2843
2425
|
}
|
|
2844
2426
|
|
|
2845
2427
|
interface InputMessage {
|
|
@@ -2948,7 +2530,7 @@ interface PseudoTcpCallbacks {
|
|
|
2948
2530
|
PseudoTcpReadable: (tcp: PseudoTcpSocket, data: any) => void
|
|
2949
2531
|
PseudoTcpWritable: (tcp: PseudoTcpSocket, data: any) => void
|
|
2950
2532
|
PseudoTcpClosed: (tcp: PseudoTcpSocket, error: number, data: any) => void
|
|
2951
|
-
WritePacket: (tcp: PseudoTcpSocket, buffer: string
|
|
2533
|
+
WritePacket: (tcp: PseudoTcpSocket, buffer: string, len: number, data: any) => PseudoTcpWriteResult
|
|
2952
2534
|
}
|
|
2953
2535
|
|
|
2954
2536
|
/**
|