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