@girs/nice-0.1 0.1.0-3.2.5 → 0.1.0-3.2.7
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.d.cts +438 -20
- package/nice-0.1.d.ts +438 -20
- package/package.json +5 -5
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
|
|
@@ -760,6 +760,189 @@ export module Agent {
|
|
|
760
760
|
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
761
761
|
*/
|
|
762
762
|
upnp_timeout?: number | null
|
|
763
|
+
/**
|
|
764
|
+
* Whether to perform periodic consent freshness checks as specified in
|
|
765
|
+
* RFC 7675. When %TRUE, the agent will periodically send binding requests
|
|
766
|
+
* to the peer to maintain the consent to send with the peer. On receipt
|
|
767
|
+
* of any authenticated error response, a component will immediately move
|
|
768
|
+
* to the failed state.
|
|
769
|
+
*
|
|
770
|
+
* Setting this property to %TRUE implies that 'keepalive-conncheck' should
|
|
771
|
+
* be %TRUE as well.
|
|
772
|
+
*/
|
|
773
|
+
consentFreshness?: boolean | null
|
|
774
|
+
/**
|
|
775
|
+
* Whether the agent has the controlling role. This property should
|
|
776
|
+
* be modified before gathering candidates, any modification occuring
|
|
777
|
+
* later will be hold until ICE is restarted.
|
|
778
|
+
*/
|
|
779
|
+
controllingMode?: boolean | null
|
|
780
|
+
/**
|
|
781
|
+
* Force all traffic to go through a relay for added privacy, this
|
|
782
|
+
* allows hiding the local IP address. When this is enabled, so
|
|
783
|
+
* local candidates are available before relay servers have been set
|
|
784
|
+
* with nice_agent_set_relay_info().
|
|
785
|
+
*/
|
|
786
|
+
forceRelay?: boolean | null
|
|
787
|
+
fullMode?: boolean | null
|
|
788
|
+
/**
|
|
789
|
+
* Whether the agent should use ICE-TCP when gathering candidates.
|
|
790
|
+
* If the option is disabled, no TCP candidates will be generated. If the
|
|
791
|
+
* agent is in reliable mode, then pseudotcp will need to be used over UDP
|
|
792
|
+
* candidates.
|
|
793
|
+
* <para>
|
|
794
|
+
* This option should be set before gathering candidates and should not be
|
|
795
|
+
* modified afterwards.
|
|
796
|
+
* </para>
|
|
797
|
+
* The #NiceAgent:ice-tcp property can be set at the same time as the
|
|
798
|
+
* #NiceAgent:ice-udp property, but both cannot be unset at the same time.
|
|
799
|
+
* If #NiceAgent:ice-udp is set to %FALSE, then this property cannot be set
|
|
800
|
+
* to %FALSE as well.
|
|
801
|
+
* <note>
|
|
802
|
+
* <para>
|
|
803
|
+
* ICE-TCP is only supported for %NICE_COMPATIBILITY_RFC5245,
|
|
804
|
+
* %NICE_COMPATIBILITY_OC2007 and %NICE_COMPATIBILITY_OC2007R2 compatibility
|
|
805
|
+
* modes.
|
|
806
|
+
* </para>
|
|
807
|
+
* </note>
|
|
808
|
+
*/
|
|
809
|
+
iceTcp?: boolean | null
|
|
810
|
+
/**
|
|
811
|
+
* Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
|
|
812
|
+
* When %TRUE, the agent will postpone changing a component state to
|
|
813
|
+
* %NICE_COMPONENT_STATE_FAILED until nice_agent_peer_candidate_gathering_done()
|
|
814
|
+
* has been called with the ID of the component's stream.
|
|
815
|
+
*/
|
|
816
|
+
iceTrickle?: boolean | null
|
|
817
|
+
/**
|
|
818
|
+
* Whether the agent should use ICE-UDP when gathering candidates.
|
|
819
|
+
* If the option is disabled, no UDP candidates will be generated. If the
|
|
820
|
+
* agent is in reliable mode, then pseudotcp will not be used since pseudotcp
|
|
821
|
+
* works on top of UDP candidates.
|
|
822
|
+
* <para>
|
|
823
|
+
* This option should be set before gathering candidates and should not be
|
|
824
|
+
* modified afterwards.
|
|
825
|
+
* </para>
|
|
826
|
+
* The #NiceAgent:ice-udp property can be set at the same time as the
|
|
827
|
+
* #NiceAgent:ice-tcp property, but both cannot be unset at the same time.
|
|
828
|
+
* If #NiceAgent:ice-tcp is set to %FALSE, then this property cannot be set
|
|
829
|
+
* to %FALSE as well.
|
|
830
|
+
*/
|
|
831
|
+
iceUdp?: boolean | null
|
|
832
|
+
/**
|
|
833
|
+
* A final timeout in msec, launched when the agent becomes idle,
|
|
834
|
+
* before stopping its activity.
|
|
835
|
+
*
|
|
836
|
+
* This timer will delay the decision to set a component as failed.
|
|
837
|
+
* This delay is added to reduce the chance to see the agent receiving
|
|
838
|
+
* new stun activity just after the conncheck list has been declared
|
|
839
|
+
* failed (some valid pairs, no nominated pair, and no in-progress
|
|
840
|
+
* pairs), reactiviting conncheck activity, and causing a (valid)
|
|
841
|
+
* state transitions like that: connecting -> failed -> connecting ->
|
|
842
|
+
* connected -> ready. Such transitions are not buggy per-se, but may
|
|
843
|
+
* break the test-suite, that counts precisely the number of time each
|
|
844
|
+
* state has been set, and doesnt expect these transcient failed
|
|
845
|
+
* states.
|
|
846
|
+
*
|
|
847
|
+
* This timer is also useful when the agent is in controlled mode and
|
|
848
|
+
* the other controlling peer takes some time to elect its nominated
|
|
849
|
+
* pair (this may be the case for SfB peers).
|
|
850
|
+
*
|
|
851
|
+
* This timer is *NOT* part if the RFC5245, as this situation is not
|
|
852
|
+
* covered in sect 8.1.2 "Updating States", but deals with a real
|
|
853
|
+
* use-case, where a controlled agent can not wait forever for the
|
|
854
|
+
* other peer to make a nomination decision.
|
|
855
|
+
*
|
|
856
|
+
* Also note that the value of this timeout will not delay the
|
|
857
|
+
* emission of 'connected' and 'ready' agent signals, and will not
|
|
858
|
+
* slow down the behaviour of the agent when the peer agent works
|
|
859
|
+
* in a timely manner.
|
|
860
|
+
*/
|
|
861
|
+
idleTimeout?: number | null
|
|
862
|
+
/**
|
|
863
|
+
* Use binding requests as keepalives instead of binding
|
|
864
|
+
* indications. This means that the keepalives may time out which
|
|
865
|
+
* will change the component state to %NICE_COMPONENT_STATE_FAILED.
|
|
866
|
+
*
|
|
867
|
+
* Enabing this is a slight violation of RFC 5245 section 10 which
|
|
868
|
+
* recommends using Binding Indications for keepalives.
|
|
869
|
+
*
|
|
870
|
+
* This is always enabled if the compatibility mode is
|
|
871
|
+
* %NICE_COMPATIBILITY_GOOGLE.
|
|
872
|
+
*
|
|
873
|
+
* This is always enabled if the 'consent-freshness' property is %TRUE
|
|
874
|
+
*/
|
|
875
|
+
keepaliveConncheck?: boolean | null
|
|
876
|
+
/**
|
|
877
|
+
* A GLib main context is needed for all timeouts used by libnice.
|
|
878
|
+
* This is a property being set by the nice_agent_new() call.
|
|
879
|
+
*/
|
|
880
|
+
mainContext?: any | null
|
|
881
|
+
maxConnectivityChecks?: number | null
|
|
882
|
+
/**
|
|
883
|
+
* The proxy server IP used to bypass a proxy firewall
|
|
884
|
+
*/
|
|
885
|
+
proxyIp?: string | null
|
|
886
|
+
/**
|
|
887
|
+
* The password used to authenticate with the proxy
|
|
888
|
+
*/
|
|
889
|
+
proxyPassword?: string | null
|
|
890
|
+
/**
|
|
891
|
+
* The proxy server port used to bypass a proxy firewall
|
|
892
|
+
*/
|
|
893
|
+
proxyPort?: number | null
|
|
894
|
+
/**
|
|
895
|
+
* The type of proxy set in the proxy-ip property
|
|
896
|
+
*/
|
|
897
|
+
proxyType?: number | null
|
|
898
|
+
/**
|
|
899
|
+
* The username used to authenticate with the proxy
|
|
900
|
+
*/
|
|
901
|
+
proxyUsername?: string | null
|
|
902
|
+
/**
|
|
903
|
+
* The initial timeout (msecs) of the STUN binding requests
|
|
904
|
+
* used in the gathering stage, to find our local candidates.
|
|
905
|
+
* This property is described as 'RTO' in the RFC 5389 and RFC 5245.
|
|
906
|
+
* This timeout is doubled for each retransmission, until
|
|
907
|
+
* #NiceAgent:stun-max-retransmissions have been done,
|
|
908
|
+
* with an exception for the last restransmission, where the timeout is
|
|
909
|
+
* divided by two instead (RFC 5389 indicates that a customisable
|
|
910
|
+
* multiplier 'Rm' to 'RTO' should be used).
|
|
911
|
+
*/
|
|
912
|
+
stunInitialTimeout?: number | null
|
|
913
|
+
/**
|
|
914
|
+
* The maximum number of retransmissions of the STUN binding requests
|
|
915
|
+
* used in the gathering stage, to find our local candidates, and used
|
|
916
|
+
* in the connection check stage, to test the validity of each
|
|
917
|
+
* constructed pair. This property is described as 'Rc' in the RFC
|
|
918
|
+
* 5389, with a default value of 7. The timeout of each STUN request
|
|
919
|
+
* is doubled for each retransmission, so the choice of this value has
|
|
920
|
+
* a direct impact on the time needed to move from the CONNECTED state
|
|
921
|
+
* to the READY state, and on the time needed to complete the GATHERING
|
|
922
|
+
* state.
|
|
923
|
+
*/
|
|
924
|
+
stunMaxRetransmissions?: number | null
|
|
925
|
+
stunPacingTimer?: number | null
|
|
926
|
+
/**
|
|
927
|
+
* The initial timeout of the STUN binding requests used
|
|
928
|
+
* for a reliable timer.
|
|
929
|
+
*/
|
|
930
|
+
stunReliableTimeout?: number | null
|
|
931
|
+
stunServer?: string | null
|
|
932
|
+
stunServerPort?: number | null
|
|
933
|
+
/**
|
|
934
|
+
* Support RENOMINATION STUN attribute proposed here:
|
|
935
|
+
* https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
|
|
936
|
+
* soon as RENOMINATION attribute is received from remote
|
|
937
|
+
* candidate's address, corresponding candidates pair gets
|
|
938
|
+
* selected. This is specific to Google Chrome/libWebRTC.
|
|
939
|
+
*/
|
|
940
|
+
supportRenomination?: boolean | null
|
|
941
|
+
/**
|
|
942
|
+
* The maximum amount of time (in milliseconds) to wait for UPnP discovery to
|
|
943
|
+
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
944
|
+
*/
|
|
945
|
+
upnpTimeout?: number | null
|
|
763
946
|
}
|
|
764
947
|
|
|
765
948
|
}
|
|
@@ -790,6 +973,28 @@ export interface Agent {
|
|
|
790
973
|
* </para>
|
|
791
974
|
*/
|
|
792
975
|
readonly bytestream_tcp: boolean
|
|
976
|
+
/**
|
|
977
|
+
* This property defines whether receive/send over a TCP or pseudo-TCP, in
|
|
978
|
+
* reliable mode, are considered as packetized or as bytestream.
|
|
979
|
+
* In unreliable mode, every send/recv is considered as packetized, and
|
|
980
|
+
* this property is ignored and cannot be set.
|
|
981
|
+
* <para>
|
|
982
|
+
* In reliable mode, this property will always return %TRUE in the
|
|
983
|
+
* %NICE_COMPATIBILITY_GOOGLE compatibility mode.
|
|
984
|
+
* </para>
|
|
985
|
+
* If the property is %TRUE, the stream is considered in bytestream mode
|
|
986
|
+
* and data can be read with any receive size. If the property is %FALSE, then
|
|
987
|
+
* the stream is considred packetized and each receive will return one packet
|
|
988
|
+
* of the same size as what was sent from the peer. If in packetized mode,
|
|
989
|
+
* then doing a receive with a size smaller than the packet, will cause the
|
|
990
|
+
* remaining bytes in the packet to be dropped, breaking the reliability
|
|
991
|
+
* of the stream.
|
|
992
|
+
* <para>
|
|
993
|
+
* This property is currently read-only, and will become read/write once
|
|
994
|
+
* bytestream mode will be supported.
|
|
995
|
+
* </para>
|
|
996
|
+
*/
|
|
997
|
+
readonly bytestreamTcp: boolean
|
|
793
998
|
/**
|
|
794
999
|
* The Nice agent can work in various compatibility modes depending on
|
|
795
1000
|
* what the application/peer needs.
|
|
@@ -807,12 +1012,29 @@ export interface Agent {
|
|
|
807
1012
|
* be %TRUE as well.
|
|
808
1013
|
*/
|
|
809
1014
|
readonly consent_freshness: boolean
|
|
1015
|
+
/**
|
|
1016
|
+
* Whether to perform periodic consent freshness checks as specified in
|
|
1017
|
+
* RFC 7675. When %TRUE, the agent will periodically send binding requests
|
|
1018
|
+
* to the peer to maintain the consent to send with the peer. On receipt
|
|
1019
|
+
* of any authenticated error response, a component will immediately move
|
|
1020
|
+
* to the failed state.
|
|
1021
|
+
*
|
|
1022
|
+
* Setting this property to %TRUE implies that 'keepalive-conncheck' should
|
|
1023
|
+
* be %TRUE as well.
|
|
1024
|
+
*/
|
|
1025
|
+
readonly consentFreshness: boolean
|
|
810
1026
|
/**
|
|
811
1027
|
* Whether the agent has the controlling role. This property should
|
|
812
1028
|
* be modified before gathering candidates, any modification occuring
|
|
813
1029
|
* later will be hold until ICE is restarted.
|
|
814
1030
|
*/
|
|
815
1031
|
controlling_mode: boolean
|
|
1032
|
+
/**
|
|
1033
|
+
* Whether the agent has the controlling role. This property should
|
|
1034
|
+
* be modified before gathering candidates, any modification occuring
|
|
1035
|
+
* later will be hold until ICE is restarted.
|
|
1036
|
+
*/
|
|
1037
|
+
controllingMode: boolean
|
|
816
1038
|
/**
|
|
817
1039
|
* Force all traffic to go through a relay for added privacy, this
|
|
818
1040
|
* allows hiding the local IP address. When this is enabled, so
|
|
@@ -820,7 +1042,15 @@ export interface Agent {
|
|
|
820
1042
|
* with nice_agent_set_relay_info().
|
|
821
1043
|
*/
|
|
822
1044
|
force_relay: boolean
|
|
1045
|
+
/**
|
|
1046
|
+
* Force all traffic to go through a relay for added privacy, this
|
|
1047
|
+
* allows hiding the local IP address. When this is enabled, so
|
|
1048
|
+
* local candidates are available before relay servers have been set
|
|
1049
|
+
* with nice_agent_set_relay_info().
|
|
1050
|
+
*/
|
|
1051
|
+
forceRelay: boolean
|
|
823
1052
|
readonly full_mode: boolean
|
|
1053
|
+
readonly fullMode: boolean
|
|
824
1054
|
/**
|
|
825
1055
|
* Whether the agent should use ICE-TCP when gathering candidates.
|
|
826
1056
|
* If the option is disabled, no TCP candidates will be generated. If the
|
|
@@ -843,6 +1073,28 @@ export interface Agent {
|
|
|
843
1073
|
* </note>
|
|
844
1074
|
*/
|
|
845
1075
|
ice_tcp: boolean
|
|
1076
|
+
/**
|
|
1077
|
+
* Whether the agent should use ICE-TCP when gathering candidates.
|
|
1078
|
+
* If the option is disabled, no TCP candidates will be generated. If the
|
|
1079
|
+
* agent is in reliable mode, then pseudotcp will need to be used over UDP
|
|
1080
|
+
* candidates.
|
|
1081
|
+
* <para>
|
|
1082
|
+
* This option should be set before gathering candidates and should not be
|
|
1083
|
+
* modified afterwards.
|
|
1084
|
+
* </para>
|
|
1085
|
+
* The #NiceAgent:ice-tcp property can be set at the same time as the
|
|
1086
|
+
* #NiceAgent:ice-udp property, but both cannot be unset at the same time.
|
|
1087
|
+
* If #NiceAgent:ice-udp is set to %FALSE, then this property cannot be set
|
|
1088
|
+
* to %FALSE as well.
|
|
1089
|
+
* <note>
|
|
1090
|
+
* <para>
|
|
1091
|
+
* ICE-TCP is only supported for %NICE_COMPATIBILITY_RFC5245,
|
|
1092
|
+
* %NICE_COMPATIBILITY_OC2007 and %NICE_COMPATIBILITY_OC2007R2 compatibility
|
|
1093
|
+
* modes.
|
|
1094
|
+
* </para>
|
|
1095
|
+
* </note>
|
|
1096
|
+
*/
|
|
1097
|
+
iceTcp: boolean
|
|
846
1098
|
/**
|
|
847
1099
|
* Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
|
|
848
1100
|
* When %TRUE, the agent will postpone changing a component state to
|
|
@@ -850,6 +1102,13 @@ export interface Agent {
|
|
|
850
1102
|
* has been called with the ID of the component's stream.
|
|
851
1103
|
*/
|
|
852
1104
|
ice_trickle: boolean
|
|
1105
|
+
/**
|
|
1106
|
+
* Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
|
|
1107
|
+
* When %TRUE, the agent will postpone changing a component state to
|
|
1108
|
+
* %NICE_COMPONENT_STATE_FAILED until nice_agent_peer_candidate_gathering_done()
|
|
1109
|
+
* has been called with the ID of the component's stream.
|
|
1110
|
+
*/
|
|
1111
|
+
iceTrickle: boolean
|
|
853
1112
|
/**
|
|
854
1113
|
* Whether the agent should use ICE-UDP when gathering candidates.
|
|
855
1114
|
* If the option is disabled, no UDP candidates will be generated. If the
|
|
@@ -865,6 +1124,21 @@ export interface Agent {
|
|
|
865
1124
|
* to %FALSE as well.
|
|
866
1125
|
*/
|
|
867
1126
|
ice_udp: boolean
|
|
1127
|
+
/**
|
|
1128
|
+
* Whether the agent should use ICE-UDP when gathering candidates.
|
|
1129
|
+
* If the option is disabled, no UDP candidates will be generated. If the
|
|
1130
|
+
* agent is in reliable mode, then pseudotcp will not be used since pseudotcp
|
|
1131
|
+
* works on top of UDP candidates.
|
|
1132
|
+
* <para>
|
|
1133
|
+
* This option should be set before gathering candidates and should not be
|
|
1134
|
+
* modified afterwards.
|
|
1135
|
+
* </para>
|
|
1136
|
+
* The #NiceAgent:ice-udp property can be set at the same time as the
|
|
1137
|
+
* #NiceAgent:ice-tcp property, but both cannot be unset at the same time.
|
|
1138
|
+
* If #NiceAgent:ice-tcp is set to %FALSE, then this property cannot be set
|
|
1139
|
+
* to %FALSE as well.
|
|
1140
|
+
*/
|
|
1141
|
+
iceUdp: boolean
|
|
868
1142
|
/**
|
|
869
1143
|
* A final timeout in msec, launched when the agent becomes idle,
|
|
870
1144
|
* before stopping its activity.
|
|
@@ -895,6 +1169,36 @@ export interface Agent {
|
|
|
895
1169
|
* in a timely manner.
|
|
896
1170
|
*/
|
|
897
1171
|
idle_timeout: number
|
|
1172
|
+
/**
|
|
1173
|
+
* A final timeout in msec, launched when the agent becomes idle,
|
|
1174
|
+
* before stopping its activity.
|
|
1175
|
+
*
|
|
1176
|
+
* This timer will delay the decision to set a component as failed.
|
|
1177
|
+
* This delay is added to reduce the chance to see the agent receiving
|
|
1178
|
+
* new stun activity just after the conncheck list has been declared
|
|
1179
|
+
* failed (some valid pairs, no nominated pair, and no in-progress
|
|
1180
|
+
* pairs), reactiviting conncheck activity, and causing a (valid)
|
|
1181
|
+
* state transitions like that: connecting -> failed -> connecting ->
|
|
1182
|
+
* connected -> ready. Such transitions are not buggy per-se, but may
|
|
1183
|
+
* break the test-suite, that counts precisely the number of time each
|
|
1184
|
+
* state has been set, and doesnt expect these transcient failed
|
|
1185
|
+
* states.
|
|
1186
|
+
*
|
|
1187
|
+
* This timer is also useful when the agent is in controlled mode and
|
|
1188
|
+
* the other controlling peer takes some time to elect its nominated
|
|
1189
|
+
* pair (this may be the case for SfB peers).
|
|
1190
|
+
*
|
|
1191
|
+
* This timer is *NOT* part if the RFC5245, as this situation is not
|
|
1192
|
+
* covered in sect 8.1.2 "Updating States", but deals with a real
|
|
1193
|
+
* use-case, where a controlled agent can not wait forever for the
|
|
1194
|
+
* other peer to make a nomination decision.
|
|
1195
|
+
*
|
|
1196
|
+
* Also note that the value of this timeout will not delay the
|
|
1197
|
+
* emission of 'connected' and 'ready' agent signals, and will not
|
|
1198
|
+
* slow down the behaviour of the agent when the peer agent works
|
|
1199
|
+
* in a timely manner.
|
|
1200
|
+
*/
|
|
1201
|
+
idleTimeout: number
|
|
898
1202
|
/**
|
|
899
1203
|
* Use binding requests as keepalives instead of binding
|
|
900
1204
|
* indications. This means that the keepalives may time out which
|
|
@@ -909,32 +1213,72 @@ export interface Agent {
|
|
|
909
1213
|
* This is always enabled if the 'consent-freshness' property is %TRUE
|
|
910
1214
|
*/
|
|
911
1215
|
keepalive_conncheck: boolean
|
|
1216
|
+
/**
|
|
1217
|
+
* Use binding requests as keepalives instead of binding
|
|
1218
|
+
* indications. This means that the keepalives may time out which
|
|
1219
|
+
* will change the component state to %NICE_COMPONENT_STATE_FAILED.
|
|
1220
|
+
*
|
|
1221
|
+
* Enabing this is a slight violation of RFC 5245 section 10 which
|
|
1222
|
+
* recommends using Binding Indications for keepalives.
|
|
1223
|
+
*
|
|
1224
|
+
* This is always enabled if the compatibility mode is
|
|
1225
|
+
* %NICE_COMPATIBILITY_GOOGLE.
|
|
1226
|
+
*
|
|
1227
|
+
* This is always enabled if the 'consent-freshness' property is %TRUE
|
|
1228
|
+
*/
|
|
1229
|
+
keepaliveConncheck: boolean
|
|
912
1230
|
/**
|
|
913
1231
|
* A GLib main context is needed for all timeouts used by libnice.
|
|
914
1232
|
* This is a property being set by the nice_agent_new() call.
|
|
915
1233
|
*/
|
|
916
1234
|
readonly main_context: any
|
|
1235
|
+
/**
|
|
1236
|
+
* A GLib main context is needed for all timeouts used by libnice.
|
|
1237
|
+
* This is a property being set by the nice_agent_new() call.
|
|
1238
|
+
*/
|
|
1239
|
+
readonly mainContext: any
|
|
917
1240
|
max_connectivity_checks: number
|
|
1241
|
+
maxConnectivityChecks: number
|
|
918
1242
|
/**
|
|
919
1243
|
* The proxy server IP used to bypass a proxy firewall
|
|
920
1244
|
*/
|
|
921
1245
|
proxy_ip: string | null
|
|
1246
|
+
/**
|
|
1247
|
+
* The proxy server IP used to bypass a proxy firewall
|
|
1248
|
+
*/
|
|
1249
|
+
proxyIp: string | null
|
|
922
1250
|
/**
|
|
923
1251
|
* The password used to authenticate with the proxy
|
|
924
1252
|
*/
|
|
925
1253
|
proxy_password: string | null
|
|
1254
|
+
/**
|
|
1255
|
+
* The password used to authenticate with the proxy
|
|
1256
|
+
*/
|
|
1257
|
+
proxyPassword: string | null
|
|
926
1258
|
/**
|
|
927
1259
|
* The proxy server port used to bypass a proxy firewall
|
|
928
1260
|
*/
|
|
929
1261
|
proxy_port: number
|
|
1262
|
+
/**
|
|
1263
|
+
* The proxy server port used to bypass a proxy firewall
|
|
1264
|
+
*/
|
|
1265
|
+
proxyPort: number
|
|
930
1266
|
/**
|
|
931
1267
|
* The type of proxy set in the proxy-ip property
|
|
932
1268
|
*/
|
|
933
1269
|
proxy_type: number
|
|
1270
|
+
/**
|
|
1271
|
+
* The type of proxy set in the proxy-ip property
|
|
1272
|
+
*/
|
|
1273
|
+
proxyType: number
|
|
934
1274
|
/**
|
|
935
1275
|
* The username used to authenticate with the proxy
|
|
936
1276
|
*/
|
|
937
1277
|
proxy_username: string | null
|
|
1278
|
+
/**
|
|
1279
|
+
* The username used to authenticate with the proxy
|
|
1280
|
+
*/
|
|
1281
|
+
proxyUsername: string | null
|
|
938
1282
|
/**
|
|
939
1283
|
* Whether the agent is providing a reliable transport of messages (through
|
|
940
1284
|
* ICE-TCP or PseudoTCP over ICE-UDP)
|
|
@@ -951,6 +1295,17 @@ export interface Agent {
|
|
|
951
1295
|
* multiplier 'Rm' to 'RTO' should be used).
|
|
952
1296
|
*/
|
|
953
1297
|
stun_initial_timeout: number
|
|
1298
|
+
/**
|
|
1299
|
+
* The initial timeout (msecs) of the STUN binding requests
|
|
1300
|
+
* used in the gathering stage, to find our local candidates.
|
|
1301
|
+
* This property is described as 'RTO' in the RFC 5389 and RFC 5245.
|
|
1302
|
+
* This timeout is doubled for each retransmission, until
|
|
1303
|
+
* #NiceAgent:stun-max-retransmissions have been done,
|
|
1304
|
+
* with an exception for the last restransmission, where the timeout is
|
|
1305
|
+
* divided by two instead (RFC 5389 indicates that a customisable
|
|
1306
|
+
* multiplier 'Rm' to 'RTO' should be used).
|
|
1307
|
+
*/
|
|
1308
|
+
stunInitialTimeout: number
|
|
954
1309
|
/**
|
|
955
1310
|
* The maximum number of retransmissions of the STUN binding requests
|
|
956
1311
|
* used in the gathering stage, to find our local candidates, and used
|
|
@@ -963,14 +1318,34 @@ export interface Agent {
|
|
|
963
1318
|
* state.
|
|
964
1319
|
*/
|
|
965
1320
|
stun_max_retransmissions: number
|
|
1321
|
+
/**
|
|
1322
|
+
* The maximum number of retransmissions of the STUN binding requests
|
|
1323
|
+
* used in the gathering stage, to find our local candidates, and used
|
|
1324
|
+
* in the connection check stage, to test the validity of each
|
|
1325
|
+
* constructed pair. This property is described as 'Rc' in the RFC
|
|
1326
|
+
* 5389, with a default value of 7. The timeout of each STUN request
|
|
1327
|
+
* is doubled for each retransmission, so the choice of this value has
|
|
1328
|
+
* a direct impact on the time needed to move from the CONNECTED state
|
|
1329
|
+
* to the READY state, and on the time needed to complete the GATHERING
|
|
1330
|
+
* state.
|
|
1331
|
+
*/
|
|
1332
|
+
stunMaxRetransmissions: number
|
|
966
1333
|
stun_pacing_timer: number
|
|
1334
|
+
stunPacingTimer: number
|
|
967
1335
|
/**
|
|
968
1336
|
* The initial timeout of the STUN binding requests used
|
|
969
1337
|
* for a reliable timer.
|
|
970
1338
|
*/
|
|
971
1339
|
stun_reliable_timeout: number
|
|
1340
|
+
/**
|
|
1341
|
+
* The initial timeout of the STUN binding requests used
|
|
1342
|
+
* for a reliable timer.
|
|
1343
|
+
*/
|
|
1344
|
+
stunReliableTimeout: number
|
|
972
1345
|
stun_server: string | null
|
|
1346
|
+
stunServer: string | null
|
|
973
1347
|
stun_server_port: number
|
|
1348
|
+
stunServerPort: number
|
|
974
1349
|
/**
|
|
975
1350
|
* Support RENOMINATION STUN attribute proposed here:
|
|
976
1351
|
* https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
|
|
@@ -979,6 +1354,14 @@ export interface Agent {
|
|
|
979
1354
|
* selected. This is specific to Google Chrome/libWebRTC.
|
|
980
1355
|
*/
|
|
981
1356
|
support_renomination: boolean
|
|
1357
|
+
/**
|
|
1358
|
+
* Support RENOMINATION STUN attribute proposed here:
|
|
1359
|
+
* https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
|
|
1360
|
+
* soon as RENOMINATION attribute is received from remote
|
|
1361
|
+
* candidate's address, corresponding candidates pair gets
|
|
1362
|
+
* selected. This is specific to Google Chrome/libWebRTC.
|
|
1363
|
+
*/
|
|
1364
|
+
supportRenomination: boolean
|
|
982
1365
|
/**
|
|
983
1366
|
* Whether the agent should use UPnP to open a port in the router and
|
|
984
1367
|
* get the external IP
|
|
@@ -989,6 +1372,11 @@ export interface Agent {
|
|
|
989
1372
|
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
990
1373
|
*/
|
|
991
1374
|
upnp_timeout: number
|
|
1375
|
+
/**
|
|
1376
|
+
* The maximum amount of time (in milliseconds) to wait for UPnP discovery to
|
|
1377
|
+
* finish before signaling the #NiceAgent::candidate-gathering-done signal
|
|
1378
|
+
*/
|
|
1379
|
+
upnpTimeout: number
|
|
992
1380
|
|
|
993
1381
|
// Owm methods of Nice-0.1.Nice.Agent
|
|
994
1382
|
|
|
@@ -1265,7 +1653,7 @@ export interface Agent {
|
|
|
1265
1653
|
* @param stream_id The ID of the stream to change
|
|
1266
1654
|
* @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().
|
|
1267
1655
|
*/
|
|
1268
|
-
get_stream_name(stream_id: number): string
|
|
1656
|
+
get_stream_name(stream_id: number): string
|
|
1269
1657
|
/**
|
|
1270
1658
|
* Parse an SDP string and extracts the candidate from it.
|
|
1271
1659
|
*
|
|
@@ -1276,7 +1664,7 @@ export interface Agent {
|
|
|
1276
1664
|
* @param sdp The remote SDP to parse
|
|
1277
1665
|
* @returns The parsed candidate or %NULL if there was an error.
|
|
1278
1666
|
*/
|
|
1279
|
-
parse_remote_candidate_sdp(stream_id: number, sdp: string
|
|
1667
|
+
parse_remote_candidate_sdp(stream_id: number, sdp: string): Candidate
|
|
1280
1668
|
/**
|
|
1281
1669
|
* Parse an SDP string and extracts candidates and credentials from it and sets
|
|
1282
1670
|
* them on the agent.
|
|
@@ -1288,7 +1676,7 @@ export interface Agent {
|
|
|
1288
1676
|
* @param sdp The remote SDP to parse
|
|
1289
1677
|
* @returns The number of candidates added, negative on errors
|
|
1290
1678
|
*/
|
|
1291
|
-
parse_remote_sdp(sdp: string
|
|
1679
|
+
parse_remote_sdp(sdp: string): number
|
|
1292
1680
|
/**
|
|
1293
1681
|
* Parse an SDP string representing a single stream and extracts candidates
|
|
1294
1682
|
* and credentials from it.
|
|
@@ -1302,7 +1690,7 @@ export interface Agent {
|
|
|
1302
1690
|
* @param pwd Pointer to store the ice password if non %NULL. Must be freed with g_free() after use
|
|
1303
1691
|
* @returns A #GSList of candidates parsed from the SDP, or %NULL in case of errors
|
|
1304
1692
|
*/
|
|
1305
|
-
parse_remote_stream_sdp(stream_id: number, sdp: string
|
|
1693
|
+
parse_remote_stream_sdp(stream_id: number, sdp: string, ufrag: string | null, pwd: string | null): Candidate[]
|
|
1306
1694
|
/**
|
|
1307
1695
|
* Notifies the agent that the remote peer has concluded candidate gathering and
|
|
1308
1696
|
* thus no more remote candidates are expected to arrive for `stream_id`.
|
|
@@ -1469,7 +1857,7 @@ export interface Agent {
|
|
|
1469
1857
|
* @param buf The buffer of data to send
|
|
1470
1858
|
* @returns The number of bytes sent, or negative error code
|
|
1471
1859
|
*/
|
|
1472
|
-
send(stream_id: number, component_id: number, len: number, buf: string
|
|
1860
|
+
send(stream_id: number, component_id: number, len: number, buf: string): number
|
|
1473
1861
|
/**
|
|
1474
1862
|
* Sends multiple messages on the socket identified by the given
|
|
1475
1863
|
* stream/component pair. Transmission is non-blocking, so a
|
|
@@ -1520,7 +1908,7 @@ export interface Agent {
|
|
|
1520
1908
|
* @param pwd nul-terminated string containing an ICE password (length must be between 4 and 256 chars)
|
|
1521
1909
|
* @returns %TRUE on success, %FALSE on error.
|
|
1522
1910
|
*/
|
|
1523
|
-
set_local_credentials(stream_id: number, ufrag: string
|
|
1911
|
+
set_local_credentials(stream_id: number, ufrag: string, pwd: string): boolean
|
|
1524
1912
|
/**
|
|
1525
1913
|
* Sets a preferred port range for allocating host candidates.
|
|
1526
1914
|
* <para>
|
|
@@ -1549,7 +1937,7 @@ export interface Agent {
|
|
|
1549
1937
|
* @param type The type of relay to use
|
|
1550
1938
|
* @returns %TRUE if the TURN settings were accepted. %FALSE if the address was invalid.
|
|
1551
1939
|
*/
|
|
1552
|
-
set_relay_info(stream_id: number, component_id: number, server_ip: string
|
|
1940
|
+
set_relay_info(stream_id: number, component_id: number, server_ip: string, server_port: number, username: string, password: string, type: RelayType): boolean
|
|
1553
1941
|
/**
|
|
1554
1942
|
* Sets, adds or updates the remote candidates for a component of a stream.
|
|
1555
1943
|
*
|
|
@@ -1596,7 +1984,7 @@ export interface Agent {
|
|
|
1596
1984
|
* @param pwd nul-terminated string containing an ICE password (length must be between 4 and 256 chars)
|
|
1597
1985
|
* @returns %TRUE on success, %FALSE on error.
|
|
1598
1986
|
*/
|
|
1599
|
-
set_remote_credentials(stream_id: number, ufrag: string
|
|
1987
|
+
set_remote_credentials(stream_id: number, ufrag: string, pwd: string): boolean
|
|
1600
1988
|
/**
|
|
1601
1989
|
* Sets the selected candidate pair for media transmission
|
|
1602
1990
|
* for a given stream's component. Calling this function will
|
|
@@ -1609,7 +1997,7 @@ export interface Agent {
|
|
|
1609
1997
|
* @param rfoundation The remote foundation of the candidate to use
|
|
1610
1998
|
* @returns %TRUE on success, %FALSE if the candidate pair cannot be found
|
|
1611
1999
|
*/
|
|
1612
|
-
set_selected_pair(stream_id: number, component_id: number, lfoundation: string
|
|
2000
|
+
set_selected_pair(stream_id: number, component_id: number, lfoundation: string, rfoundation: string): boolean
|
|
1613
2001
|
/**
|
|
1614
2002
|
* Sets the selected remote candidate for media transmission
|
|
1615
2003
|
* for a given stream's component. This is used to force the selection of
|
|
@@ -1644,7 +2032,7 @@ export interface Agent {
|
|
|
1644
2032
|
* </note>
|
|
1645
2033
|
* @param software The value of the SOFTWARE attribute to add.
|
|
1646
2034
|
*/
|
|
1647
|
-
set_software(software: string
|
|
2035
|
+
set_software(software: string): void
|
|
1648
2036
|
/**
|
|
1649
2037
|
* This function will assign a media type to a stream. The only values
|
|
1650
2038
|
* that can be used to produce a valid SDP are: "audio", "video",
|
|
@@ -1660,7 +2048,7 @@ export interface Agent {
|
|
|
1660
2048
|
* @param name The new name of the stream or %NULL
|
|
1661
2049
|
* @returns %TRUE if the name has been set. %FALSE in case of error (invalid stream or duplicate name).
|
|
1662
2050
|
*/
|
|
1663
|
-
set_stream_name(stream_id: number, name: string
|
|
2051
|
+
set_stream_name(stream_id: number, name: string): boolean
|
|
1664
2052
|
/**
|
|
1665
2053
|
* Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options
|
|
1666
2054
|
* @param stream_id The ID of the stream
|
|
@@ -1881,6 +2269,21 @@ export module PseudoTcpSocket {
|
|
|
1881
2269
|
* Support is enabled by default.
|
|
1882
2270
|
*/
|
|
1883
2271
|
support_fin_ack?: boolean | null
|
|
2272
|
+
ackDelay?: number | null
|
|
2273
|
+
noDelay?: boolean | null
|
|
2274
|
+
rcvBuf?: number | null
|
|
2275
|
+
sndBuf?: number | null
|
|
2276
|
+
/**
|
|
2277
|
+
* Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
|
|
2278
|
+
* this socket. The extension is only compatible with other libnice pseudo-TCP
|
|
2279
|
+
* stacks, and not with Jingle pseudo-TCP stacks. If enabled, support is
|
|
2280
|
+
* negotiatied on connection setup, so it is safe for a #PseudoTcpSocket with
|
|
2281
|
+
* support enabled to be used with one with it disabled, or with a Jingle
|
|
2282
|
+
* pseudo-TCP socket which doesn’t support it at all.
|
|
2283
|
+
*
|
|
2284
|
+
* Support is enabled by default.
|
|
2285
|
+
*/
|
|
2286
|
+
supportFinAck?: boolean | null
|
|
1884
2287
|
}
|
|
1885
2288
|
|
|
1886
2289
|
}
|
|
@@ -1890,11 +2293,15 @@ export interface PseudoTcpSocket {
|
|
|
1890
2293
|
// Own properties of Nice-0.1.Nice.PseudoTcpSocket
|
|
1891
2294
|
|
|
1892
2295
|
ack_delay: number
|
|
2296
|
+
ackDelay: number
|
|
1893
2297
|
callbacks: any
|
|
1894
2298
|
readonly conversation: number
|
|
1895
2299
|
no_delay: boolean
|
|
2300
|
+
noDelay: boolean
|
|
1896
2301
|
rcv_buf: number
|
|
2302
|
+
rcvBuf: number
|
|
1897
2303
|
snd_buf: number
|
|
2304
|
+
sndBuf: number
|
|
1898
2305
|
readonly state: number
|
|
1899
2306
|
/**
|
|
1900
2307
|
* Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
|
|
@@ -1907,6 +2314,17 @@ export interface PseudoTcpSocket {
|
|
|
1907
2314
|
* Support is enabled by default.
|
|
1908
2315
|
*/
|
|
1909
2316
|
readonly support_fin_ack: boolean
|
|
2317
|
+
/**
|
|
2318
|
+
* Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
|
|
2319
|
+
* this socket. The extension is only compatible with other libnice pseudo-TCP
|
|
2320
|
+
* stacks, and not with Jingle pseudo-TCP stacks. If enabled, support is
|
|
2321
|
+
* negotiatied on connection setup, so it is safe for a #PseudoTcpSocket with
|
|
2322
|
+
* support enabled to be used with one with it disabled, or with a Jingle
|
|
2323
|
+
* pseudo-TCP socket which doesn’t support it at all.
|
|
2324
|
+
*
|
|
2325
|
+
* Support is enabled by default.
|
|
2326
|
+
*/
|
|
2327
|
+
readonly supportFinAck: boolean
|
|
1910
2328
|
|
|
1911
2329
|
// Owm methods of Nice-0.1.Nice.PseudoTcpSocket
|
|
1912
2330
|
|
|
@@ -2025,7 +2443,7 @@ export interface PseudoTcpSocket {
|
|
|
2025
2443
|
* @param len The length of `buffer`
|
|
2026
2444
|
* @returns %TRUE if the packet was processed successfully, %FALSE otherwise
|
|
2027
2445
|
*/
|
|
2028
|
-
notify_packet(buffer: string
|
|
2446
|
+
notify_packet(buffer: string, len: number): boolean
|
|
2029
2447
|
/**
|
|
2030
2448
|
* Receive data from the socket.
|
|
2031
2449
|
*
|
|
@@ -2058,7 +2476,7 @@ export interface PseudoTcpSocket {
|
|
|
2058
2476
|
* @param len The length of `buffer`
|
|
2059
2477
|
* @returns The number of bytes sent or -1 in case of error <para> See also: pseudo_tcp_socket_get_error() </para>
|
|
2060
2478
|
*/
|
|
2061
|
-
send(buffer: string
|
|
2479
|
+
send(buffer: string, len: number): number
|
|
2062
2480
|
/**
|
|
2063
2481
|
* Sets the current monotonic time to be used by the TCP socket when calculating
|
|
2064
2482
|
* timeouts and expiry times. If this function is not called, or is called with
|
|
@@ -2233,7 +2651,7 @@ export interface Address {
|
|
|
2233
2651
|
* @param str The string to set
|
|
2234
2652
|
* @returns %TRUE if success, %FALSE on error
|
|
2235
2653
|
*/
|
|
2236
|
-
set_from_string(str: string
|
|
2654
|
+
set_from_string(str: string): boolean
|
|
2237
2655
|
/**
|
|
2238
2656
|
* Set `addr` to an IPv4 address using the data from `addr_ipv4`
|
|
2239
2657
|
*
|
|
@@ -2412,14 +2830,14 @@ export class Candidate {
|
|
|
2412
2830
|
* @param transport a #NiceCandidateTransport
|
|
2413
2831
|
* @returns a static string with the candidate transport
|
|
2414
2832
|
*/
|
|
2415
|
-
static transport_to_string(transport: CandidateTransport): string
|
|
2833
|
+
static transport_to_string(transport: CandidateTransport): string
|
|
2416
2834
|
/**
|
|
2417
2835
|
* Useful for debugging functions, just returns a static string with the
|
|
2418
2836
|
* candidate type.
|
|
2419
2837
|
* @param type a #NiceCandidateType
|
|
2420
2838
|
* @returns a static string with the candidate type
|
|
2421
2839
|
*/
|
|
2422
|
-
static type_to_string(type: CandidateType): string
|
|
2840
|
+
static type_to_string(type: CandidateType): string
|
|
2423
2841
|
}
|
|
2424
2842
|
|
|
2425
2843
|
export interface InputMessage {
|
|
@@ -2528,7 +2946,7 @@ export interface PseudoTcpCallbacks {
|
|
|
2528
2946
|
PseudoTcpReadable: (tcp: PseudoTcpSocket, data: any) => void
|
|
2529
2947
|
PseudoTcpWritable: (tcp: PseudoTcpSocket, data: any) => void
|
|
2530
2948
|
PseudoTcpClosed: (tcp: PseudoTcpSocket, error: number, data: any) => void
|
|
2531
|
-
WritePacket: (tcp: PseudoTcpSocket, buffer: string
|
|
2949
|
+
WritePacket: (tcp: PseudoTcpSocket, buffer: string, len: number, data: any) => PseudoTcpWriteResult
|
|
2532
2950
|
}
|
|
2533
2951
|
|
|
2534
2952
|
/**
|