Ai
1 Star 0 Fork 0

Stefan/xgameCommon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
httpsServer.go 515 Bytes
一键复制 编辑 原始数据 按行查看 历史
Stefan 提交于 2020-05-09 19:57 +08:00 . fix.
// add by stefan
package httpsExServiceTLS
import (
"define"
"fmt"
"log"
"net/http"
"time"
)
func StartHttpsServiceTLS(port int, certfile string, keyfile string, handler define.HandlerFunc) {
s := &http.Server{
Addr: fmt.Sprintf(":%d", port),
Handler: handler,
ReadTimeout: 30 * time.Second,
WriteTimeout: 30 * time.Second,
MaxHeaderBytes: 1 << 16,
}
err := s.ListenAndServeTLS(certfile, keyfile)
if err != nil {
log.Fatal("https ListenAndServe: ", err)
return
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/stefan886/xgameCommon.git
git@gitee.com:stefan886/xgameCommon.git
stefan886
xgameCommon
xgameCommon
v0.0.5

搜索帮助