code: func (s *Server) Start(ctx context.Context, name string, port int, serve ServeFunc) (*net.TCPAddr, error) {
  	s.l.Lock()
  	defer s.l.Unlock()
  
  	if s.ctx != nil {
  		return nil, errors.New("already initialized")
  	}
  
  	ln, err := net.Listen("tcp", fmt.Sprintf("127.0.0.1:%d", port))
  	if err != nil {
  		return nil, errors.Annotate(err, "failed to create listening socket").Err()
  	}
  
  	s.name = name
  	s.ctx, s.cancel = context.WithCancel(ctx)
  	s.listener = ln
  
  	// Start serving in background.
  	s.stopped = make(chan struct{})
  	go func() {
  		defer close(s.stopped)
  		if err := s.serve(serve); err != nil {
  			logging.WithError(err).Errorf(s.ctx, "Unexpected error in the server loop of %q", s.name)
  		}
  	}()
  
  	return ln.Addr().(*net.TCPAddr), nil
  }
docs: // Start launches background goroutine with the serving loop 'serve'.
  //
  // Returns the address the listening socket is bound to.
  //
  // The provided context is used as base context for request handlers and for
  // logging. 'name' identifies this server in logs, and 'port' specifies a TCP
  // port number to bind to (or 0 to auto-pick one).
  //
  // The server must be eventually stopped with Stop().