Overview
TheNetworkType enum represents the combination of transport protocol (UDP or TCP) and IP version (IPv4 or IPv6) used for ICE candidates.
Type Definition
Types
NetworkTypeUDP4
NetworkTypeUDP6
NetworkTypeTCP4
NetworkTypeTCP6
Methods
String
"udp4"for NetworkTypeUDP4"udp6"for NetworkTypeUDP6"tcp4"for NetworkTypeTCP4"tcp6"for NetworkTypeTCP6
NetworkShort
"udp"for UDP types"tcp"for TCP types
IsUDP
IsTCP
IsIPv4
IsIPv6
IsReliable
truefor TCP typesfalsefor UDP types
Usage Examples
Default Behavior
When no network types are specified, all four types are enabled by default:ICE-TCP Considerations
When using TCP network types, you may need to configure TCP-specific options:Filtering Network Types
You can also filter at the IP level:Address Rewrite Rules
Network types can be used to scope address rewrite rules:Matrix of Characteristics
| Network Type | Protocol | IP Version | Reliable | String |
|---|---|---|---|---|
| NetworkTypeUDP4 | UDP | IPv4 | No | ”udp4” |
| NetworkTypeUDP6 | UDP | IPv6 | No | ”udp6” |
| NetworkTypeTCP4 | TCP | IPv4 | Yes | ”tcp4” |
| NetworkTypeTCP6 | TCP | IPv6 | Yes | ”tcp6” |
Related
- Agent Options - WithNetworkTypes configuration
- Candidate Types - ICE candidate types
- TCPMux - TCP multiplexing for ICE-TCP