2021-09-03 10:26:29 +08:00
|
|
|
//go:build windows
|
2020-06-30 12:43:21 +08:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package core
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"time"
|
2021-12-06 12:44:26 +08:00
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
2020-06-30 12:43:21 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func initServer(address string, router *gin.Engine) server {
|
|
|
|
return &http.Server{
|
|
|
|
Addr: address,
|
|
|
|
Handler: router,
|
2021-11-19 22:20:04 +08:00
|
|
|
ReadTimeout: 20 * time.Second,
|
|
|
|
WriteTimeout: 20 * time.Second,
|
2020-06-30 12:43:21 +08:00
|
|
|
MaxHeaderBytes: 1 << 20,
|
|
|
|
}
|
2021-04-04 21:32:23 +08:00
|
|
|
}
|