lib/connections: Support setting traffic class (fixes #3790)

This commit is contained in:
AudriusButkevicius
2016-12-20 20:14:52 +00:00
committed by Jakob Borg
parent 9e7d50bc76
commit 9e0afb7d8a
84 changed files with 5972 additions and 0 deletions

View File

@@ -39,6 +39,16 @@ func (d *tcpDialer) Dial(id protocol.DeviceID, uri *url.URL) (internalConn, erro
return internalConn{}, err
}
err = dialer.SetTCPOptions(conn)
if err != nil {
l.Infoln(err)
}
err = dialer.SetTrafficClass(conn, d.cfg.Options().TrafficClass)
if err != nil {
l.Debugf("failed to set traffic class: %s", err)
}
tc := tls.Client(conn, d.tlsCfg)
err = tlsTimedHandshake(tc)
if err != nil {