⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vtft.h

📁 http协议下的文件传输程序
💻 H
字号:
//#ifndef _vtft_h// put your code below here#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <netinet/in.h>#include <arpa/inet.h>#include <netdb.h>#include <sys/time.h>#include <signal.h>#include <curses.h>#include <dirent.h>#include <sys/stat.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <fstream.h> #include <time.h>#include <vdk/vdk.h>#include "vdkthread.h"#include <fstream.h> #include <vdk/vdkarray.h>#include <vdk/vdkstring.h>#include <vdk/vdkbtrees.h>typedef VDKArray<VDKString>      CVAString;typedef VDKArray<CVAString>      CVAAString;typedef VDKBtree<VDKString>       CVBTString;class  CvtFTC : public VDKThread {protected:        CVBTString                vbtsFilePath;        guchar                      *puchBuf;        char                          chFileBuf[20000];	char                          chPostBuf[20000];        char                          strShowBuf[4096];        char                          strHostAdd[64];	char                          strTmp[10240];        int                           iSock,iError;        char*                         pHostname;        int                           iPort;        int                           iSocks_port;        char                          strPort[10];        int                           iSize,iPackID;        struct sockaddr_in            sSoin, sFrom;        struct hostent               *psHostent;        int                           ibSendDataStatus;        int                           ibRecvDataStatus;        int                           iSendDataSize;        int                           iRecvDataSize;        ifstream                      ifUpload;        ofstream                      ofDownload;        char                          chSendData[20000];        char                          chRecvData[20000];        char                          strCtrlinfo[20000];        char                          strShowInfo[1024];        VDKMutex                      vmShowMutex;        int                           iups;        int                           iComDataFileID;         int                           iChStatus;        int                           iPackInfo;        int                           iFileInfo;        int                           iCounts;        int                           iStrlens;        int                           iBuflens;        int                           iPackAttrib;        char                        strHostName[1024];        char                        strCmd[1024];        char                        strLocalPath[4096];        char                        strRemotePath[4096];         char	                     strFileName[4096];        char                        strLocalFilePath[4096];        char                        strRemoteFilePath[4096];        char                        strLocalDir[4096];        char                        strRemoteDir[4096];        struct  stat                mystat;        struct  tm                 *pmytm;        CVAString               vastrSendFiles;        CVAString               vastrSendDirs;        CVAString               vastrFileList;        CVAString               vastrDirList;        CVAString               vastrDirListBuf;        VDKString               vstrPath;        VDKString               vstrBuf;        VDKString               vstrTmp;        CVAString              *pvastrLists;protected:        void     Execute ();        int        UploadSetup();        int        DownloadSetup();        int        Upload();        int        Download();public:        CvtFTC ();         ~CvtFTC ();        int        Setup(char*   PpstrHostName, char* PpstrCmd, char*  PpstrLocalPath,  char* PpstrRemotePath,  CVAString*  PpvastrLists);        char*    ShowInfo();};#define _vtft_h//#endif// do not remove this mark: #!#// end of file:vtft.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -