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

📄 zigdefs_8h-source.html

📁 用来介绍ZIG Library游戏网络引擎的文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>zigdefs.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>zigdefs.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment">    ZIG - An extendable, portable game engine focused on networking &amp; scripting</span>00003 <span class="comment">    Project Home: http://zige.sourceforge.net</span>00004 <span class="comment">    Copyright (C) 2002  F醔io Reis Cecin &lt;fcecin AT inf DOT ufrgs DOT br&gt;</span>00005 <span class="comment"></span>00006 <span class="comment">    This library is free software; you can redistribute it and/or</span>00007 <span class="comment">    modify it under the terms of the GNU Lesser General Public</span>00008 <span class="comment">    License as published by the Free Software Foundation; either</span>00009 <span class="comment">    version 2.1 of the License, or (at your option) any later version.</span>00010 <span class="comment"></span>00011 <span class="comment">    This library is distributed in the hope that it will be useful,</span>00012 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>00013 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>00014 <span class="comment">    Lesser General Public License for more details.</span>00015 <span class="comment"></span>00016 <span class="comment">    You should have received a copy of the GNU Lesser General Public</span>00017 <span class="comment">    License along with this library; if not, write to the Free Software</span>00018 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   </span>00019 <span class="comment">*/</span>00020 <span class="comment">/*</span>00021 <span class="comment"></span>00022 <span class="comment">        zigdefs.h</span>00023 <span class="comment"></span>00024 <span class="comment">        some INTERNAL definitions for some or all the ZIG module implementations</span>00025 <span class="comment"></span>00026 <span class="comment">        you may want to tweak some of these defines, e.g., ZIG_FILE_DOWNLOAD_CHUNK_SIZE</span>00027 <span class="comment"></span>00028 <span class="comment">*/</span>00029 00030 <span class="preprocessor">#ifndef _ZIG_HEADER_ZIGDEFS_H_</span>00031 <span class="preprocessor"></span><span class="preprocessor">#define _ZIG_HEADER_ZIGDEFS_H_</span>00032 <span class="preprocessor"></span>00033 <span class="preprocessor">#ifndef NO_DOXYGEN              // internal stuff -- do not document</span>00034 <span class="preprocessor"></span>00035 <span class="comment">// TWEAK OPTION: define this and recompile the lib to remove ZIG's dependency on Pthreads. this </span>00036 <span class="comment">// will disable some ZIG functionality, such as the assigning of different thread priorities to </span>00037 <span class="comment">// network threads</span>00038 <span class="comment">//#define ZIG_NO_PTHREADS</span>00039 00040 <span class="comment">// TWEAK OPTION: define this and recompile the lib to disable support for packet compression. this </span>00041 <span class="comment">// reduces the lib size a bit if you're not using compression</span>00042 <span class="comment">//#define ZIG_NO_BZIP2</span>00043 00044 <span class="comment">// TWEAK OPTION: define this to serialize all callbacks so the descendants of zigserver_c and </span>00045 <span class="comment">// zigclient_c will not need to use mutexes (that is, if the only threads it is using are ZIG's </span>00046 <span class="comment">// internal ones)</span>00047 <span class="preprocessor">#define ZIG_SERIALIZE_CALLBACKS</span>00048 <span class="preprocessor"></span>00049 <span class="comment">// TWEAK OPTION: size of file chunks when downloading</span>00050 <span class="preprocessor">#define ZIG_FILE_DOWNLOAD_CHUNK_SIZE 4096</span>00051 <span class="preprocessor"></span>00052 <span class="comment">// TWEAK OPTION: a magic number agreed between client and server. MUST BE A DOUBLE</span>00053 <span class="preprocessor">#define ZIGNET_IMPLICIT_PING_MS 3200.0</span>00054 <span class="preprocessor"></span>00055 <span class="comment">// TWEAK OPTION: initial allocation size in bytes of UDP packet-writing buffers. </span>00056 <span class="preprocessor">#define ZIG_UDP_WRITE_BUFFER_INITIAL_SIZE 1024</span>00057 <span class="preprocessor"></span>00058 <span class="comment">// TWEAK OPTION: initial allocation size in bytes of UDP packet-reading buffers. </span>00059 <span class="comment">// NOTE: currently, if a UDP packet reading operation fails because the buffer is too</span>00060 <span class="comment">// small, the buffer is increased in size by this same amount and the packet that </span>00061 <span class="comment">// failed to be read can get dropped.</span>00062 <span class="preprocessor">#define ZIG_UDP_READ_BUFFER_INITIAL_SIZE 8192</span>00063 <span class="preprocessor"></span>00064 <span class="comment">// ZIGNET version unsigned byte</span>00065 <span class="comment">//version 3: zig 1.3.0 (support for reliable messages larger than 255 bytes)</span>00066 <span class="comment">//version 2: zig 1.1 (compression support) </span>00067 <span class="comment">//version 1: zig 1.0.x</span>00068 <span class="preprocessor">#define ZIG_NET_VERSION 3</span>00069 <span class="preprocessor"></span>00070 <span class="comment">// ZIGNET SERVER connect rejection codes</span>00071 <span class="keyword">enum</span> {00072 00073         ZIGNET_REJECT_VERSION = 1,              <span class="comment">//zig rejected you by version mismatch, next byte is the server's version</span>00074         ZIGNET_REJECT_GAMESERVER                        <span class="comment">//zig accepted you but the gameserver rejected you, follows custom binary</span>00075                                       <span class="comment">//reason block from your gameserver implementation.</span>00076 };00077 00078 <span class="comment">//request/response messages for zignet</span>00079 <span class="keyword">enum</span> {00080 00081         <span class="comment">//zignet's ziglet sync protocol</span>00082         ZIGSYNC_STC_CLIENT_PREPARING,00083         ZIGSYNC_STC_CLIENT_READY,00084         ZIGSYNC_STC_ZIGLET_TEST,00085         ZIGSYNC_STC_FILE_TEST,00086 00087         <span class="comment">//zignet message - net tick changed</span>00088         ZIGNET_STC_SERVER_NETRATE_CHANGED00089 };00090 00091 <span class="keyword">enum</span> {00092 00093         <span class="comment">//zignet's ziglet sync protocol</span>00094         ZIGSYNC_CTS_ZIGLET_OK,00095         ZIGSYNC_CTS_ZIGLET_NEEDED,00096         ZIGSYNC_CTS_FILE_OK,00097         ZIGSYNC_CTS_FILE_NEEDED00098 };00099 00100 <span class="comment">//ZIG: types of channels</span>00101 <span class="keyword">enum</span> {00102         ZIGNET_CHANNEL_USER,00103         ZIGNET_CHANNEL_ZIGLET_PREPARER00104 };00105 00106 <span class="preprocessor">#endif // #ifndef NO_DOXYGEN            // internal class -- do not document</span>00107 <span class="preprocessor"></span>00108 <span class="preprocessor">#endif</span>00109 <span class="preprocessor"></span></pre></div><hr><address style="align: right;"><small>Generated on Mon Jan 24 21:14:23 2005 for ZIG by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

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