MCPcopy Create free account
hub / github.com/pion/ice / SetRemoteCredentials

Method SetRemoteCredentials

agent.go:1854–1866  ·  view source on GitHub ↗

SetRemoteCredentials sets the credentials of the remote agent.

(remoteUfrag, remotePwd string)

Source from the content-addressed store, hash-verified

1852
1853// SetRemoteCredentials sets the credentials of the remote agent.
1854func (a *Agent) SetRemoteCredentials(remoteUfrag, remotePwd string) error {
1855 switch {
1856 case remoteUfrag == "":
1857 return ErrRemoteUfragEmpty
1858 case remotePwd == "":
1859 return ErrRemotePwdEmpty
1860 }
1861
1862 return a.loop.Run(a.loop, func(_ context.Context) {
1863 a.remoteUfrag = remoteUfrag
1864 a.remotePwd = remotePwd
1865 })
1866}
1867
1868// UpdateOptions applies the given options to the agent at runtime.
1869// Only a subset of options can be updated after agent creation:

Callers 3

TestUDPMux_Agent_RestartFunction · 0.80
TestAgentRestartFunction · 0.80

Calls 1

RunMethod · 0.80

Tested by 2

TestUDPMux_Agent_RestartFunction · 0.64
TestAgentRestartFunction · 0.64