code: func NewNamedPipeServer(ctx context.Context, name string) (StreamServer, error) {
  	switch l := len(name); {
  	case l == 0:
  		return nil, errors.New("cannot have empty name")
  	case l > maxWindowsNamedPipeLength:
  		return nil, errors.Reason("name exceeds maximum length %d", maxWindowsNamedPipeLength).
  			InternalReason("name(%s)", name).Err()
  	}
  
  	ctx = log.SetField(ctx, "name", name)
  	return &listenerStreamServer{
  		Context: ctx,
  		gen: func() (net.Listener, string, error) {
  			address := "net.pipe:" + name
  			pipePath := streamclient.LocalNamedPipePath(name)
  			log.Fields{
  				"addr":     address,
  				"pipePath": pipePath,
  			}.Debugf(ctx, "Creating Windows server socket Listener.")
  
  			l, err := winio.ListenPipe(pipePath, nil)
  			if err != nil {
  				return nil, "", errors.Annotate(err, "failed to listen on named pipe").Err()
  			}
  			return l, address, nil
  		},
  	}, nil
  }
docs: // NewNamedPipeServer instantiates a new Windows named pipe server instance.