Openat self-coding implements FTP Client

Source: Internet
Author: User
Tags ftp file ftp client

# Ifndef _ dota_h _
# DEFINE _ dota_h _
# Ifndef _ dota_h
# DEFINE _ dota_h
# Define dotaext
# Else
# Define dotaext extern
# Endif
# Include "tda_global.h"

// Ftpclient callback
Dotaext void ftpcallback (wip_event_t * eV, Enum state * CTX );
// Create an FTP Client
Dotaext u8 create_ftpclient (ASCII * ftpserver );
// Execute the server-side Protocol
Dotaext void execftpcmd (ASCII * cmd );
// Send the logon Password
Dotaext void ftppassword (INT argc, int cmdindex, const ASCII ** argv );
// Send Logon
Dotaext void ftplogin (INT argc, int cmdindex, const ASCII ** argv );
// User Logon successful
Dotaext void ftplogined (INT argc, int cmdindex, const ASCII ** argv );
// FTP logon timeout
Dotaext void ftpconnecttimeout (INT argc, int cmdindex, const ASCII ** argv );
// FTP transmission mode set successfully
Dotaext void ftpsettransfertypeok (INT argc, int cmdindex, const ASCII ** argv );
// FTP starts to download data
Dotaext void ftpstarttransferdata (INT argc, int cmdindex, const ASCII ** argv );
// FTP data download complete
Dotaext void ftptransferdatacomplete (INT argc, int cmdindex, const ASCII ** argv );
// FTP parses the PASV Port
Dotaext void ftppasvparse (INT argc, int cmdindex, const ASCII ** argv );
// Create FTP client data
Dotaext u8 create_ftpdataclient (ASCII * ftpserver, 2010ftpport );
// Ftpdataclient callback
Dotaext void ftpdatacallback (wip_event_t * eV, Enum state * CTX );
// No file exists on the remote server.
Dotaext void ftpnofileonremote (INT argc, int cmdindex, const ASCII ** argv );
// Close the FTP data channel
Dotaext void close_ftpdatachannel ();
// Close the FTP Command Channel
Dotaext void close_ftpchannel ();
// Remote File resumable upload through FTP
Dotaext void ftprestfile (INT argc, int cmdindex, const ASCII ** argv );
// Resumable upload
Dotaext void rest ();
// Send a command to FTP
Dotaext void ftpwrite (u8 * data, 2010len );
// Ftpclient callback
Dotaext void ftpcallback (wip_event_t * eV, Enum state * CTX );
// Ftpdataclient callback
Dotaext void ftpdatacallback (wip_event_t * eV, Enum state * CTX );
# Endif
// FTP channel_command
Wip_channel_t ftpchannel = (wip_channel_t) NULL;/* ftpchannel ,*/
// FTP data channel
Wip_channel_t ftpdatachannel = (wip_channel_t) NULL;/* ftpdatachannel */
// Remote Upgrade
Extern Dota;
// The length of the FTP Receiving File
U32 ftprevlen = 0;
// FTP file length
U32 ftpfilelen = 0;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.