// NewWebServer returns a work client enabled http server func NewWebServer(config workclient.Config, fd int, cmdArgs []string) *WebServer { server := new(WebServer) server.cmdArgs = cmdArgs server.httpServer = gracefulhttp.NewServer(config.WebAddr, 0) server.httpServer.ReadTimeout = config.ReadTimeout server.httpServer.WriteTimeout = config.WriteTimeout server.httpServer.MaxHeaderBytes = config.MaxHeaderBytes server.httpServer.FileDescriptor = fd server.Configure(config, server.listen, server.stopListening) return server }
// NewWebServer returns a work client enabled http server func NewWebServer(config *WebConfig, fd int, cmdArgs []string) *WebServer { server := new(WebServer) server.cmdArgs = cmdArgs server.httpServer = gracefulhttp.NewServer(config.WebAddr, 0) server.httpServer.ReadTimeout = config.ReadTimeout server.httpServer.WriteTimeout = config.WriteTimeout server.httpServer.MaxHeaderBytes = config.MaxHeaderBytes server.httpServer.FileDescriptor = fd server.Configure(config.Config, server.listen, server.stopListening) server.bport = config.BroadcastPort server.bip = config.BroadcastIP server.bprotocol = config.BroadcastProto return server }