Network Component  
MDK Middleware for IPv4 and IPv6 Networking
 
Loading...
Searching...
No Matches
User Callback

Function to notify the user application about events on the FTP server. More...

Functions

void netFTPs_Notify (netFTPs_Event event)
 Notify the user application about events in FTP server service. [user-provided].
 

Description

Function to notify the user application about events on the FTP server.

In case you need to notify your application about events that are happening on the FTP server, the function netFTPs_Notify is to be used. It is part of the file FTP_Server_Event.c. You need to adapt the function to the application's needs.

Function Documentation

◆ netFTPs_Notify()

void netFTPs_Notify ( netFTPs_Event  event)

Notify the user application about events in FTP server service. [user-provided].

Parameters
[in]eventFTP Server notification event as specified in netFTPs_Event.
Note
Network library calls this function to inform the user about events.

The callback function netFTPs_Notify notifies the user application about events in FTP server. This function is useful to synchronize various actions, such as firmware upgrade, to FTP server events. The firmware upgrade might start after the netFTPs_EventLogout event is signaled and a new firmware image file has been uploaded to the server.

The argument event contains the FTP server event as specified by netFTPs_Event.

Code Example

The following skeleton is available in the user code template file FTP_Server_Event.c. Customize it to the application's needs.

switch (event) {
// User logged in, session is busy
break;
// User logged out, session is idle
break;
// User login failed (invalid credentials)
break;
// File download ended
break;
// File upload ended
break;
// File deleted
break;
// File or directory renamed
break;
// Directory created
break;
// Directory removed
break;
// Requested file operation denied
break;
// Local file operation error
break;
// Generic file operation error
// Generic FTP server error
break;
}
}