• haoyanbin's avatar
    1 · 9bf9e037
    haoyanbin authored
    9bf9e037
server_other.go 336 Bytes
// +build !windows

package core

import (
	"github.com/fvbock/endless"
	"github.com/gin-gonic/gin"
	"time"
)

func initServer(address string, router *gin.Engine) server {
	s := endless.NewServer(address, router)
	s.ReadHeaderTimeout = 1000 * time.Millisecond
	s.WriteTimeout = 100 * time.Second
	s.MaxHeaderBytes = 1 << 20
	return s
}