FtpSession constructor
FtpSession(
- Socket controlSocket, {
- String? username,
- String? password,
- required List<
String> allowedDirectories, - required String startingDirectory,
- required ServerType serverType,
- 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);
}