今天我們的“本地雲”練手項目開工第一天,剛開完會,來記錄個日報。
項目成員:
成員 | 職位 | CSDN賬號 | 暱稱 |
---|---|---|---|
1號 | 服務器(組長) | https://blog.csdn.net/qq_43762191 | 看,未來 |
2號 | 服務器 | https://me.csdn.net/qq_45792305 | qq_45792305 |
3號 | 客戶端 | https://me.csdn.net/blackcamouflage | blackcamouflage |
4號 | 客戶端 | https://me.csdn.net/luyaozhima | 路遙芝麻 |
5號 | 測試端 | https://me.csdn.net/jxy0219 | jxy0219 |
6號 | 服務器 | https://me.csdn.net/weixin_44784684 | 若曉夢 |
7號 | 服務器 | ||
8號 | 客戶端(組長) | https://me.csdn.net/qq_42151344 | MXN179 |
9號 | 客戶端 | https://me.csdn.net/qq_46485161 | 別呀 |
5號 | 測試端 | https://me.csdn.net/jxy0219 | jxy0219 |
出勤情況:
組別 | 出勤情況 |
---|---|
1組 | 全勤 |
2組 | 服務器1號中暑了 |
會議內容
1、分組,分組情況如上。
2、確定項目秩序,明確組長的監督與協助職責,每日日報需要按時提交。
3、明確數據包協議:
#ifndef I_PACKET_PUBLIC_H
#define I_PACKET_PUBLIC_H
#include <string>
#include <iostream>
using namespace std;
#define MAX_LEN 256
/************接入層數據包頭************/
typedef struct packet_header_st
{
int fd;//用於前後端通信即目標客戶端fd(服務器用到)
int funcId; // 功能號
//登錄包0x01,註冊包0x02,找回密碼0x03,修改密碼0x04
//客戶端獲取文件列表0x11,上傳文件0x12,下載文件0x13,共享文件0x14
//心跳0x21
int optid; // 操作碼:請求0x00 和 應答0x01
int usrlenth;// 包體的長度
int packet_seq; //包序號
int packet_sum; //包總數
char srcAddr[6]; //預留
char dstAddr[6]; //預留
int syn; // 判斷包頭是否正確 0x04
}packet_header_t;
/************接入層數據包尾************/
typedef struct packet_tali_st//包尾,用來驗證數據包的完整性
{
int pack_tail;//設置爲0x05
}packet_tali_t;
/************數據包報文整體************/
typedef struct packet_all_st
{
packet_header_t head;
char body[packet_header_t::usrlenth];
packet_tali_st tail;
//unsigned len; //要發送的數據有效長度
}packet_all_st;
/************業務層數據包體************/
//客戶端登錄請求包
typedef struct login
{
int id;
char psw[10]; //密碼
}Login_t;
//登錄應答包
typedef struct res_login_st
{
int login_ret; //登錄結果: 1-登錄成功,0-登錄失敗
}res_login_t;
//客戶端註冊請求包
typedef struct Register
{
int id; //賬號
char tel[12]; //11位手機號
char psw[10]; //密碼
}Register_t;
//註冊應答包
typedef struct res_register_st
{
int register_ret; //註冊結果: 0-註冊成功,1-註冊失敗
}res_register_t;
//客戶端修改密碼請求包
typedef struct Change_PWD
{
int id; //賬號
char psw[10]; //密碼
}c_pwd_t;
//改密碼應答包
typedef struct res_changepwd_st
{
int change_ret; //改密碼結果: 0-改密碼成功,1-改密碼失敗
}res_cpwd_t;
//找回密碼請求包
typedef struct findpwd
{
int id;
char tel[12];
}F_Pwd_t;
//找回密碼應答包
typedef struct res_findpwd_st
{
int find_ret; //找回結果: 0-找回成功,1-找回失敗
char pwd[20]; //密碼
}res_fpwd_t;
/************請求業務交易流水請求包************/
//上傳文件請求包
typedef struct UpFile
{
int id;
}UpFile_t;
//下載視頻請求包
typedef struct Download_File
{
int user_id; //用戶ID
char *file_id; //文件名
}Download_t;
//文件列表請求包
typedef struct File_List
{
char *dir_name; //目錄名
}FileList_t;
//文件列表應答包
typedef struct Res_VideoList
{
char V[800];
}res_filelist;
#endif // PACKET_BASE_H
4、明確一些技術點:
數據包傳輸使用不定長包、IPC進程間通信方法採用TCP、客戶端自行管理下載之後的文件、客戶端自行保留歷史記錄等
5、今日任務:
需求分析、日報、項目進度甘特圖。