Add output of accepted IP version (#111)

This commit is contained in:
der-onkel 2020-02-26 07:02:10 +01:00 committed by GitHub
parent 58ae94e286
commit cca979577e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,6 +32,7 @@ var gCert []byte
func runServer(testParam EthrTestParam, serverParam ethrServerParam) {
defer stopStatsTimer()
initServer(serverParam.showUI)
showAcceptedIPVersion()
runTCPBandwidthServer()
runTCPCpsServer()
runTCPLatencyServer()
@ -157,6 +158,16 @@ func serverWatchControlChannel(test *ethrTest, waitForChannelStop chan bool) {
watchControlChannel(test, waitForChannelStop)
}
func showAcceptedIPVersion() {
var ipVerString = "ipv4, ipv6"
if ipVer == ethrIPv4 {
ipVerString = "ipv4"
} else if ipVer == ethrIPv6 {
ipVerString = "ipv6"
}
ui.printMsg("Accepting IP version: %s", ipVerString)
}
func runTCPBandwidthServer() {
l, err := net.Listen(tcp(ipVer), hostAddr+":"+tcpBandwidthPort)
if err != nil {