add 2 options to control httpinvoke and jsonrpc 2.0 services

This commit is contained in:
smallnest
2019-05-30 20:12:39 +08:00
parent d681726821
commit d90b4ba208
2 changed files with 16 additions and 8 deletions

View File

@@ -59,10 +59,12 @@ var (
// Server is rpcx server that use TCP or UDP.
type Server struct {
ln net.Listener
readTimeout time.Duration
writeTimeout time.Duration
gatewayHTTPServer *http.Server
ln net.Listener
readTimeout time.Duration
writeTimeout time.Duration
gatewayHTTPServer *http.Server
DisableHTTPGateway bool // should disable http invoke or not.
DisableJSONRPC bool // should disable json rpc or not.
serviceMapMu sync.RWMutex
serviceMap map[string]*service