code: func ServePortForward(w http.ResponseWriter, req *http.Request, portForwarder PortForwarder, podName string, uid types.UID, portForwardOptions *V4Options, idleTimeout time.Duration, streamCreationTimeout time.Duration, supportedProtocols []string) {
  	var err error
  	if wsstream.IsWebSocketRequest(req) {
  		err = handleWebSocketStreams(req, w, portForwarder, podName, uid, portForwardOptions, supportedProtocols, idleTimeout, streamCreationTimeout)
  	} else {
  		err = handleHTTPStreams(req, w, portForwarder, podName, uid, supportedProtocols, idleTimeout, streamCreationTimeout)
  	}
  
  	if err != nil {
  		runtime.HandleError(err)
  		return
  	}
  }
docs: // ServePortForward handles a port forwarding request.  A single request is
  // kept alive as long as the client is still alive and the connection has not
  // been timed out due to idleness. This function handles multiple forwarded
  // connections; i.e., multiple `curl http://localhost:8888/` requests will be
  // handled by a single invocation of ServePortForward.