From 9c67878002db7ead6bd851d31366052fc88898e6 Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 5 Dec 2017 14:27:56 +0900 Subject: [PATCH] ing --- server/server.go | 4 ++-- server/server_handlers.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/server.go b/server/server.go index 754e213..b81f267 100644 --- a/server/server.go +++ b/server/server.go @@ -6,13 +6,13 @@ import ( "git.loafle.net/commons_go/server" ) -func New(addr string, rpcInvoker crr.RPCInvoker) server.Server { +func New(addr string, serverName string, rpcInvoker crr.RPCInvoker) server.Server { rpcSH := newRPCServletHandler(rpcInvoker) rpcSH.RegisterCodec(crpj.Name, crpj.NewServerCodec()) socketHandler := newSocketHandler(rpcSH) - sh := newServerHandler(addr, socketHandler) + sh := newServerHandler(addr, serverName, socketHandler) s := server.New(sh) return s diff --git a/server/server_handlers.go b/server/server_handlers.go index e0860d3..0727b14 100644 --- a/server/server_handlers.go +++ b/server/server_handlers.go @@ -4,16 +4,15 @@ import ( "fmt" "git.loafle.net/commons_go/logging" - "git.loafle.net/commons_go/server" ) -func newServerHandler(addr string, socketHandler SocketHandler) ServerHandler { +func newServerHandler(addr string, serverName string, socketHandler SocketHandler) ServerHandler { sh := &ServerHandlers{ addr: addr, } - sh.Name = "Network Container" + sh.Name = serverName sh.SocketHandler = socketHandler return sh }