code: func (s *Server) Handler(w http.ResponseWriter, r *http.Request) {
  	c := s.Upgrade(w, r)
  	if c.Err() != nil {
  		http.Error(w, fmt.Sprintf("websocket error: %v\n", c.Err()), http.StatusServiceUnavailable)
  		return
  	}
  	// NOTE TO ME: fire these first BEFORE startReader and startPinger
  	// in order to set the events and any messages to send
  	// the startPinger will send the OK to the client and only
  	// then the client is able to send and receive from Server
  	// when all things are ready and only then. DO NOT change this order.
  
  	// fire the on connection event callbacks, if any
  	for i := range s.onConnectionListeners {
  		s.onConnectionListeners[i](c)
  	}
  
  	// start the ping and the messages reader
  	c.Wait()
  }
docs: // Handler is the websocket handler which registers the endpoint's handler
  // and fires the events to the registered `OnConnection` event.
  // It should be called once per Server, its result should be passed
  // as a route handler to register the websocket's endpoint.
  //
  // Endpoint is the path which the websocket Server will listen for clients/connections.
  //
  // To serve the built'n javascript client-side library look the `websocket.ClientHandler`.
  // This handles any websocket error, use the `Upgrade` for custom error reporting and connection handling.