mirror of
				https://github.com/pion/webrtc.git
				synced 2025-11-01 03:04:06 +08:00 
			
		
		
		
	Add SettingsEngine option to disable Active TCP
Use SettingsEngine.DisableActiveTCP(true)
This commit is contained in:
		| @@ -121,6 +121,7 @@ func (g *ICEGatherer) createAgent() error { | ||||
| 		TCPMux:                 g.api.settingEngine.iceTCPMux, | ||||
| 		UDPMux:                 g.api.settingEngine.iceUDPMux, | ||||
| 		ProxyDialer:            g.api.settingEngine.iceProxyDialer, | ||||
| 		DisableActiveTCP:       g.api.settingEngine.iceDisableActiveTCP, | ||||
| 	} | ||||
|  | ||||
| 	requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes | ||||
|   | ||||
| @@ -86,6 +86,7 @@ type SettingEngine struct { | ||||
| 	iceTCPMux                                 ice.TCPMux | ||||
| 	iceUDPMux                                 ice.UDPMux | ||||
| 	iceProxyDialer                            proxy.Dialer | ||||
| 	iceDisableActiveTCP                       bool | ||||
| 	disableMediaEngineCopy                    bool | ||||
| 	srtpProtectionProfiles                    []dtls.SRTPProtectionProfile | ||||
| 	receiveMTU                                uint | ||||
| @@ -348,6 +349,11 @@ func (e *SettingEngine) SetICEProxyDialer(d proxy.Dialer) { | ||||
| 	e.iceProxyDialer = d | ||||
| } | ||||
|  | ||||
| // DisableActiveTCP disables using active TCP for ICE. Active TCP is enabled by default | ||||
| func (e *SettingEngine) DisableActiveTCP(isDisabled bool) { | ||||
| 	e.iceDisableActiveTCP = isDisabled | ||||
| } | ||||
|  | ||||
| // DisableMediaEngineCopy stops the MediaEngine from being copied. This allows a user to modify | ||||
| // the MediaEngine after the PeerConnection has been constructed. This is useful if you wish to | ||||
| // modify codecs after signaling. Make sure not to share MediaEngines between PeerConnections. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Zhao
					David Zhao