Define and document the flow window size for transfer.

Document webapi timeout parameters.
This commit is contained in:
Kleissner
2021-11-13 14:41:14 +01:00
parent eb0ad540fe
commit a727f4d8b1
2 changed files with 10 additions and 1 deletions

View File

@@ -31,7 +31,8 @@ var WSUpgrader = websocket.Upgrader{
},
}
// Start starts the API. ListenAddresses is a list of IP:Ports
// Start starts the API. ListenAddresses is a list of IP:Ports.
// The certificate file and key are only used if SSL is enabled. The read and write timeout may be 0 for no timeout.
func Start(ListenAddresses []string, UseSSL bool, CertificateFile, CertificateKey string, TimeoutRead, TimeoutWrite time.Duration) {
if len(ListenAddresses) == 0 {
return
@@ -77,6 +78,7 @@ func Start(ListenAddresses []string, UseSSL bool, CertificateFile, CertificateKe
}
// startWebServer starts a web-server with given parameters and logs the status. If may block forever and only returns if there is an error.
// The certificate file and key are only used if SSL is enabled. The read and write timeout may be 0 for no timeout.
func startWebServer(WebListen string, UseSSL bool, CertificateFile, CertificateKey string, Handler http.Handler, Info string, ReadTimeout, WriteTimeout time.Duration) {
tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12} // for security reasons disable TLS 1.0/1.1