From 06e9b0038c65d88b4128b440f58c64714f1a3a84 Mon Sep 17 00:00:00 2001 From: xc Date: Tue, 9 Sep 2025 11:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=B8=8A=E4=BC=A0=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scagent/main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scagent/main.go b/scagent/main.go index dd8a534..808ad36 100644 --- a/scagent/main.go +++ b/scagent/main.go @@ -64,6 +64,14 @@ func main() { logger.Error("Register failed", zap.Error(err)) return } + + // 文件上传功能 + err = rpc.RegisterName("FileUploadService", new(core.FileService)) + if err != nil { + logger.Error("Register failed", zap.Error(err)) + return + } + // sport := fmt.Sprintf(":%v", config.G.Port) logger.Info("Listen port", zap.String("port", sport)) @@ -87,7 +95,7 @@ func main() { logger.Error("AcceptTCP failed", zap.Error(err)) continue } - jsonrpc.ServeConn(conn) + go jsonrpc.ServeConn(conn) } }