Function esp_idf_sys::esp_vfs_register_fd

source ยท
pub unsafe extern "C" fn esp_vfs_register_fd(
    vfs_id: esp_vfs_id_t,
    fd: *mut c_int,
) -> esp_err_t
Expand description

Special function for registering another file descriptor for a VFS registered by esp_vfs_register_with_id. This function should only be used to register permanent file descriptors (socket fd) that are not removed after being closed.

@param vfs_id VFS identificator returned by esp_vfs_register_with_id. @param fd The registered file descriptor will be written to this address.

@return ESP_OK if the registration is successful, ESP_ERR_NO_MEM if too many file descriptors are registered, ESP_ERR_INVALID_ARG if the arguments are incorrect.