mylistsocketblock.h

来自「组播发送测试网络程序,客户端」· C头文件 代码 · 共 32 行

H
32
字号
#include "stdafx.h"
#ifndef _MY_LIST_SOCKET_BLOCK_H
#define _MY_LIST_SOCKET_BLOCK_H

#pragma warning(disable: 4786)
#include <list>
using namespace std ;
#define BLOCK_ERROR_LOSSBLOCK     0   //数据包丢失
#define BLOCK_ERROR_LIST          1   // 数据包顺序错误 

typedef struct _tag_BlockListInfo{
	int   nFlag;
    DWORD dwBlockIndex;
	DWORD dwPreBlockIndex;
	long  lIndexOff;
	long  lTimeOff;
}BlockListInfo,*pBlockListInfo;           //数据包

 /**************Redefine your BlockNamee****************/
#define ALIASBLOCKINDEX dwBlockIndex

typedef DataBlock SocketBlock,*pSocketBlock;

typedef list<pSocketBlock> ListSocketBlock,*pListSocketBlock;


extern void AddBlockInBlockList(pListSocketBlock pBlockList,pSocketBlock pBlock);
extern void FreeBlockList(pListSocketBlock pBlockList);
extern bool PopHeaderBlock(pListSocketBlock pBlockList,pSocketBlock pBlock_,
					int nValidSize);
extern void ShowSocketList(pListSocketBlock pBlockList);
#endif

⌨️ 快捷键说明

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