enterExtendedPassiveMode method

Future<void> enterExtendedPassiveMode()

Implementation

Future<void> enterExtendedPassiveMode() async {
  try {
    dataListener = await ServerSocket.bind(InternetAddress.anyIPv4, 0);
    int port = dataListener!.port;
    sendResponse('229 Entering Extended Passive Mode (|||$port|)');
    dataListener!.first.then((socket) {
      dataSocket = socket;
    });
  } catch (e) {
    sendResponse('425 Can\'t enter extended passive mode');
    logger.generalLog('Error entering extended passive mode: $e');
  }
}