code: func setWS(ctx *cli.Context, cfg *node.Config) {
  	if ctx.GlobalBool(WSEnabledFlag.Name) && cfg.WSHost == "" {
  		cfg.WSHost = "127.0.0.1"
  		if ctx.GlobalIsSet(WSListenAddrFlag.Name) {
  			cfg.WSHost = ctx.GlobalString(WSListenAddrFlag.Name)
  		}
  	}
  
  	if ctx.GlobalIsSet(WSPortFlag.Name) {
  		cfg.WSPort = ctx.GlobalInt(WSPortFlag.Name)
  	}
  	if ctx.GlobalIsSet(WSAllowedOriginsFlag.Name) {
  		cfg.WSOrigins = splitAndTrim(ctx.GlobalString(WSAllowedOriginsFlag.Name))
  	}
  	if ctx.GlobalIsSet(WSApiFlag.Name) {
  		cfg.WSModules = splitAndTrim(ctx.GlobalString(WSApiFlag.Name))
  	}
  }
docs: // setWS creates the WebSocket RPC listener interface string from the set
  // command line flags, returning empty if the HTTP endpoint is disabled.