code: func (n *Node) startWS(endpoint string, apis []rpc.API, modules []string, wsOrigins []string, exposeAll bool) error {
  	// Short circuit if the WS endpoint isn't being exposed
  	if endpoint == "" {
  		return nil
  	}
  	listener, handler, err := rpc.StartWSEndpoint(endpoint, apis, modules, wsOrigins, exposeAll)
  	if err != nil {
  		return err
  	}
  	n.log.Info("WebSocket endpoint opened", "url", fmt.Sprintf("ws://%s", listener.Addr()))
  	// All listeners booted successfully
  	n.wsEndpoint = endpoint
  	n.wsListener = listener
  	n.wsHandler = handler
  
  	return nil
  }
docs: // startWS initializes and starts the websocket RPC endpoint.