Add batch i/o to improve throughput (#2033)

* Add batch i/o to improve throughput

* remove empty line

* Solve comments

* Change rtcconfig.UDPPort to PortRange

* Fix test
This commit is contained in:
cnderrauber
2023-09-06 10:18:20 +08:00
committed by GitHub
parent 1590b96686
commit 9b9298b927
10 changed files with 21 additions and 15 deletions
+3 -2
View File
@@ -55,8 +55,9 @@ func printPorts(c *cli.Context) error {
if conf.RTC.TCPPort != 0 {
tcpPorts = append(tcpPorts, fmt.Sprintf("%d - ICE/TCP", conf.RTC.TCPPort))
}
if conf.RTC.UDPPort != 0 {
udpPorts = append(udpPorts, fmt.Sprintf("%d - ICE/UDP", conf.RTC.UDPPort))
if conf.RTC.UDPPort.Valid() {
portStr, _ := conf.RTC.UDPPort.MarshalYAML()
udpPorts = append(udpPorts, fmt.Sprintf("%s - ICE/UDP", portStr))
} else {
udpPorts = append(udpPorts, fmt.Sprintf("%d-%d - ICE/UDP range", conf.RTC.ICEPortRangeStart, conf.RTC.ICEPortRangeEnd))
}