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

📄 clientstructdefine.h

📁 mysee网络直播源代码Mysee Lite是Mysee独立研发的网络视频流媒体播放系统。在应有了P2P技术和一系列先进流媒体技术之后
💻 H
字号:
/*
 *  Openmysee
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
#pragma once

#include "FreeList.h"
#include "PushList.h"
#include "IntervalArray.h"
#include "MediaArray.h"
#include ".\external\TE_Socket.h"
#include ".\external\Rand.h"
#include ".\external\md5.h"
#include "CriticalSection.h"
#include "TransferCalculator.h"

// 操作系统版本
enum OS_Version {OS_UNKNOWN, OS_WIN95, OS_WIN98, OS_WINME, 
                OS_WINNT40, OS_WIN2000, OS_WINXP, OS_WIN2003};

// 配置信息
class ConfigData {
public:
	UINT GetSum() { return OUTGOING_NUM+INCOMING_NUM+OUT_4FREE_NUM+IN_4FREE_NUM;};
	UINT GetIncoming() { return INCOMING_NUM+IN_4FREE_NUM;};
	UINT GetOutgoing() { return OUTGOING_NUM+OUT_4FREE_NUM;};
	float COMMUNICATOR_VERSION;	// 版本
	float ACCEPT_VERSION;		// 可以接受的最低版本
	float ADD_PROGNAME_VERSION; // 增加了节目名的版本
	float ADD_PROGTIME_VERSION; // 增加了节目时间的版本
	UINT8 OUTGOING_NUM;			// 最大连出连接
	UINT8 INCOMING_NUM;			// 最大连入连接
	UINT8 OUT_4FREE_NUM;		// 为他人做贡献的连出连接
	UINT8 IN_4FREE_NUM;			// 为他人做贡献的连入连接
	string post_log_url;		// 接收post log的页面url
	string module_base;			// layer1.dll所在的目录
	int allow_post;				// 是否允许post 1 允许, 0 不允许
};

struct ConnectingPeer : public PeerInfoWithAddr {
	// 连接中的SOCKET
	SOCKET sock;
	// 是否连入连接
	bool isIncoming;
	// 是否free连接
	bool isForFree;
	// 双方当前资源是否相同
	bool isSameRes;
	// 是否被动连接
	bool isPassive;
	// 是否内网连接
	bool isSameLan;
	// 开始连接的时间
	DWORD connectTime;
};

typedef list<PeerInfoWithAddr>::iterator	PeerAddrIt;
typedef list<ConnectingPeer>::iterator		CPeerIt;

⌨️ 快捷键说明

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