资源简介
基于UDP网络传输协议的C++网络库,实现高效的网络传输服务。通常情况下用于游戏,但也可以用于其它项目
代码片段和文件信息
/*-
* Parts of this code are copyright 2003-2005 Colin Percival
* All rights reserved
*
* Redistribution and use in source and binary forms with or without
* modification are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘‘AS IS‘‘ AND ANY EXPRESS OR
* IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL
* DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT
* STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#if 0
__FBSDID(“$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.cv 1.1 2005/08/06 01:59:06 cperciva Exp $“);
#endif
#include “MemoryCompressor.h“
#include
#include
#include
#include
#ifndef _WIN32
// KevinJ - Windows compatibility
#include
#include
#else
typedef int ssize_t;
#include
#include
#define fseeko fseek
static void err(int i ...)
{
exit(i);
}
static void errx(int i ...)
{
exit(i);
}
#endif
#include
static off_t offtin(u_char *buf)
{
off_t y;
y=buf[7]&0x7F;
y=y*256;y+=buf[6];
y=y*256;y+=buf[5];
y=y*256;y+=buf[4];
y=y*256;y+=buf[3];
y=y*256;y+=buf[2];
y=y*256;y+=buf[1];
y=y*256;y+=buf[0];
if(buf[7]&0x80) y=-y;
return y;
}
// This function modifies the main() function included in bspatch.c of bsdiff-4.3 found at http://www.daemonology.net/bsdiff/
// It is changed to be a standalone function to work entirely in memory and to use my class MemoryDecompressor as an interface to BZip
// Up to the caller to deallocate new
bool ApplyPatch(char *old unsigned int oldsize char **_new unsigned int *newsize char *patch unsigned int patchsize )
{
// FILE * f * cpf * dpf * epf;
// BZFILE * cpfbz2 * dpfbz2 * epfbz2;
// int cbz2err dbz2err ebz2err;
// int fd;
// ssize_t oldsizenewsize;
ssize_t bzctrllenbzdatalen;
//u_char header[32];
u_char buf[8];
// u_char *old *_new;
off_t oldposnewpos;
off_t ctrl[3];
// off_t lenread;
off_t i;
MemoryDecompressor decompress;
unsigned int coff doff eoff;
// if(argc!
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1414 2007-01-14 23:06 2.x to 3.x upgrade.txt
文件 4131 2007-12-20 23:57 CMakeLists.txt
文件 5628 2005-11-27 18:57 DMCMakefile.win
文件 10147 2006-12-06 09:36 Doxyfile
文件 2269 2007-12-20 23:13 Makefile
文件 1327 2005-09-18 07:20 PortAudioLicense.txt
文件 30603 2007-11-14 13:35 RakNet.cbp
文件 23638 2007-11-14 13:36 RakNet.dev
文件 27567 2006-12-13 12:00 RakNet.sln
文件 25856 2007-10-13 21:42 RakNet_vc8.sln
文件 4332 2008-01-06 11:05 readme.txt
文件 1451 2005-09-18 07:20 SpeexLicense.txt
文件 13509 2007-11-14 11:16 DependentExtensions\ApplyPatch.cpp
文件 219 2006-07-31 10:57 DependentExtensions\ApplyPatch.h
文件 19347 2007-07-28 17:26 DependentExtensions\AutopatcherClient.cpp
文件 5250 2007-06-28 17:08 DependentExtensions\AutopatcherClient.h
目录 0 2007-12-27 20:49 DependentExtensions\AutopatcherPostgreRepository\
文件 3334 2006-12-13 12:00 DependentExtensions\AutopatcherPostgreRepository\AutopatcherPostgreRepository.vcproj
文件 1387 2006-12-06 08:47 DependentExtensions\AutopatcherPostgreRepository\AutopatcherPostgreRepository.vcproj.user
文件 3963 2006-12-13 12:57 DependentExtensions\AutopatcherPostgreRepository\AutopatcherPostgreRepository_vc8.vcproj
文件 29037 2007-11-23 09:37 DependentExtensions\AutopatcherPostgreRepository\PostgreRepository.cpp
文件 5943 2007-07-28 16:58 DependentExtensions\AutopatcherPostgreRepository\PostgreRepository.h
文件 714 2006-12-14 10:56 DependentExtensions\AutopatcherPostgreRepository\Readme.txt
文件 9014 2007-11-09 09:41 DependentExtensions\AutopatcherServer.cpp
文件 4517 2007-06-22 08:49 DependentExtensions\AutopatcherServer.h
目录 0 2007-12-20 23:21 DependentExtensions\bzip2-1.0.3\
文件 33735 2005-02-15 08:19 DependentExtensions\bzip2-1.0.3\blocksort.c
文件 1096 2004-10-17 08:57 DependentExtensions\bzip2-1.0.3\bz-common.xsl
文件 10099 2004-10-17 08:57 DependentExtensions\bzip2-1.0.3\bz-fo.xsl
文件 666 2004-10-17 08:59 DependentExtensions\bzip2-1.0.3\bz-html.xsl
文件 2181 2004-10-09 03:29 DependentExtensions\bzip2-1.0.3\bzdiff
............此处省略1428个文件信息
相关资源
- 基于UDP的简单可视化界面聊天程序c
- 基于VC++6.0的UDP通讯
- 自己编写的C++基于socket编程的UDP聊天
- VC++UDP网络聊天程序
- C语言写的UDP文件传输
- 基于UDP协议的聊天程序 MFC环境下的
- MFC UDP 聊天
- 基于VC++的UDP文件传输系统
- C++基于UDP的控制台局域网聊天程序
- 基于UDP的通信程序设计
- 网络调试助手---开发环境:VC++6.0 基于
- 基于MFC的UDP通信实现
- MFC中利用CSocket实现UDP通信
- MFC实现UDP网络编程
- UDP简单文件传输
- 基于MFC对话框的UDP客户端服务器端程
- 用MFC开发的UDP接收和发送软件
- 完成端口IOCP+UDP源码
- 基于UDP协议的简单聊天系统设计与实
- c语言简易飞秋
- c++(socket)音频传输
- UDP打洞有心跳包和断网自动连接功能
- MFC窗口打开ppt,可通过UDP控制。
- c++实现基于停等协议的可靠udp传输的
- 使用UDP协议进行类FTP协议的实现
- 利用mfc实现的udp通信,包括,客户端
- 基于UDP的MFC 通讯小程序
- 基于UDP的聊天程序MFC实现
- 基于MFC的UDP简易聊天室
- RTSP PUSH tcp udp h264 easydarwin
评论
共有 条评论