func (s *Server) ClientConnected(cc serverlib.ClientContext) (string, error) {
	s.nbClientsSync.Lock()
	defer s.nbClientsSync.Unlock()
	s.nbClients++
	s.logger.Info(
		"Client connected",
		"clientId", cc.ID(),
		"remoteAddr", cc.RemoteAddr(),
		"nbClients", s.nbClients,
	)
	if s.config.Content.Logging.FtpExchanges {
		cc.SetDebug(true)
	}
	return "ftpserver", nil
}
ClientConnected is called to send the very first welcome message
package server
import (
	"crypto/tls"
	"errors"
	"fmt"
	"io/ioutil"
	"sync"
	"time"
	"github.com/spf13/afero"
	serverlib "github.com/fclairamb/ftpserverlib"
	log "github.com/fclairamb/go-log"
	"github.com/fclairamb/ftpserver/config"
	"github.com/fclairamb/ftpserver/config/confpar"
	"github.com/fclairamb/ftpserver/fs"
	"github.com/fclairamb/ftpserver/fs/fslog"
)
type Server struct {  
	config          *config.Config
	logger          log.Logger
	nbClients       uint32
	nbClientsSync   sync.Mutex
	zeroClientEvent chan error
	tlsOnce         sync.Once
	tlsConfig       *tls.Config
	tlsError        error
	accesses        *fsCache
}
type fsCache struct {
	sync.Mutex
	accesses map[string]afero.Fs
}
func newFsCache() *fsCache {
	return &fsCache{
		accesses: make(map[string]afero.Fs),
	}
}
var ErrTimeout = errors.New("timeout")
var ErrNotEnabled = errors.New("not enabled")
func NewServer(config *config.Config, logger log.Logger) (*Server, error) {
	return &Server{
		config:   config,
		logger:   logger,
		accesses: newFsCache(),
	}, nil
}
func (s *Server) GetSettings() (*serverlib.Settings, error) {
	conf := s.config.Content
	var portRange *serverlib.PortRange
	if conf.PassiveTransferPortRange != nil {
		portRange = &serverlib.PortRange{
			Start: conf.PassiveTransferPortRange.Start,
			End:   conf.PassiveTransferPortRange.End,
		}
	}
	return &serverlib.Settings{
		ListenAddr:               conf.ListenAddress,
		PublicHost:               conf.PublicHost,
		PassiveTransferPortRange: portRange,
	}, nil
}