From 3f7eb1110a6f4835d8cabf91f90b223486db5481 Mon Sep 17 00:00:00 2001 From: chenxinquan Date: Thu, 16 Nov 2023 11:25:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0BS=E6=A1=86=E6=9E=B6=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GenmaiBSUI.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/GenmaiBSUI.go b/src/GenmaiBSUI.go index b3fc7fc..c3b8df4 100644 --- a/src/GenmaiBSUI.go +++ b/src/GenmaiBSUI.go @@ -3,6 +3,8 @@ package main import ( "github.com/gin-gonic/gin" BsUtils"main/genmai/BsUtils" + // "time" + "net/http" ) func main() { @@ -10,7 +12,19 @@ func main() { r := gin.Default() BsUtils.Route(r) + // r.Use(func(c *gin.Context){ + // c.Header("Connection","keep-alive") + // c.Header("Keep-Alive","900") + // c.Next() + // }) + + server := &http.Server{ + Addr: ":8001", + Handler: r, + // ReadTimeout: 10 * time.Second, + // WriteTimeout: 10 * time.Second, + } // 运行Gin应用 - r.Run(":8001") + _=server.ListenAndServe() }