code: private <T,S> void upgradeWebSocket(ServiceWebSocket<T,S> service)
    {
      /*
      try {
        _service.open((WebRequest) request);
      } catch (Exception e) {
        log.log(Level.WARNING, e.toString(), e);
      }
      */
      TypeRef type = TypeRef.of(service.getClass()).to(ServiceWebSocket.class).param(0);
  
      ServiceRef selfRef = ServiceRef.current();
  
      service = selfRef.pin(service).as(ServiceWebSocket.class);
  
      Class<T> rawClass = (Class) type.rawClass();
  
      WebSocketBaratineImpl<T,S> ws
        = new WebSocketBaratineImpl<>(webApp().wsManager(),
                                      service, rawClass);
  
      try {
        if (! ws.handshake(this)) {
          throw new ServiceException("WebSocket handshake failed for " + this);
        }
      } catch (Exception e) {
        log.log(Level.WARNING, e.toString(), e);
        e.printStackTrace();
  
        fail(e);
      }
      //request.flush();
    }
docs: Service a request.
  
  @param service the http request facade