ing
This commit is contained in:
parent
87b8c60cd9
commit
9c67878002
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user