FtpSession constructor

FtpSession(
  1. Socket controlSocket, {
  2. String? username,
  3. String? password,
  4. required List<String> allowedDirectories,
  5. required String startingDirectory,
  6. required ServerType serverType,
  7. required LoggerHandler logger,
})

Implementation

FtpSession(
  this.controlSocket, {
  this.username,
  this.password,
  required this.allowedDirectories,
  required this.startingDirectory,
  required this.serverType,
  required this.logger,
})  : currentDirectory = startingDirectory,
      commandHandler = FTPCommandHandler(controlSocket, logger) {
  sendResponse('220 Welcome to the FTP server');
  controlSocket.listen(processCommand, onDone: closeConnection);
}