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

📄 data.h

📁 linux下多线程的下载软件源码
💻 H
字号:
#ifndef DATA_H#define DATA_H#include <pthread.h>#include <netinet/in.h>#include "Defs.h"typedef struct request {	char host[MAXHOSTSIZ];		/* Remote host	*/	char url[MAXURLSIZ];		/* URL		*/	char file[MAXBUFSIZ];		/* file name	*/	char lfile[MAXBUFSIZ];		/* if local file name is specified	*/	char ip[MAXIPSIZ];		/* Remote IP	*/	char username[MAXBUFSIZ];		char password[MAXBUFSIZ];	int port;	int clength;			/* Content-length	*/	unsigned char proto;		/* Protocol		*/} request;typedef struct thread_data {	struct sockaddr_in sin;	char getstr[GETREQSIZ];	long soffset;		/* Start offset		*/	long foffset;		/* Finish offset	*/	long offset;		/* Current Offset	*/	long clength;		/* Content Length	*/	int fd;	pthread_t tid;		/* Thread ID		*/	unsigned char status;	/* thread exit status	*/} thread_data;#endif

⌨️ 快捷键说明

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