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