mirror of
https://github.com/pion/ice.git
synced 2025-09-27 11:52:18 +08:00
Use MultiUDPMux to implement listen any address
In #475, import low-level API (ReadMsgUDP) to determine destination interface for packets received by UDPConn listen at any(unspecified) address, to fix msg received by incorrect candidate that shared same ufrags. But the api has compatibility issues, also not reliable in some special network cases like AWS/ECS. So this pr revert that change, and make UDPMuxDefault not accept Conn listen at unspecified address. Also provide a NewMultiUDPMuxFromPort helper function to create a MultiUDPMux to listen at all addresses. For ice gather, it will use UDPMux's listen address to generate canidates instead of create it from interfaces.
This commit is contained in:
@@ -134,11 +134,12 @@ var (
|
||||
errMismatchUsername = errors.New("username mismatch")
|
||||
errICEWriteSTUNMessage = errors.New("the ICE conn can't write STUN messages")
|
||||
errUDPMuxDisabled = errors.New("UDPMux is not enabled")
|
||||
errCandidateIPNotFound = errors.New("could not determine local IP for Mux candidate")
|
||||
errNoXorAddrMapping = errors.New("no address mapping")
|
||||
errSendSTUNPacket = errors.New("failed to send STUN packet")
|
||||
errXORMappedAddrTimeout = errors.New("timeout while waiting for XORMappedAddr")
|
||||
errNotImplemented = errors.New("not implemented yet")
|
||||
errNoUDPMuxAvailable = errors.New("no UDP mux is available")
|
||||
errNoTCPMuxAvailable = errors.New("no TCP mux is available")
|
||||
errListenUnspecified = errors.New("can't listen on unspecified address")
|
||||
errInvalidAddress = errors.New("invalid address")
|
||||
)
|
||||
|
Reference in New Issue
Block a user