目录 教训 参考知识 服务器端 客户端 实验目的 实验内容 实验过程 GBN协议 服务器端设计 客户端设计 实验结果 全双工传输 题目与源码
// GBN_client.cpp : 定义控制台应用程序的入口点。#include <stdio.h>#include <stdlib.h>#include <WinSock2.h>#include <time.h>#include <fstream>#pragma comment(lib,"ws2_32.lib")#define SERVER_PORT 12340 //接收数据的端口号#define SERVER_IP "127.0.0.1" // 服务器的 IP 地址const int BUFFER_LENGTH = 1026;const int SEQ_SIZE = 20; //接收端序列号个数,为 1~20const int SE