Notes: This version introduces minor API changes that break existing code. Please read all of the "API CHANGE:" change items in the changelog to bring your ZIG v1.2.5 code up-to-date with more ease.
Changes: ------------------------------------------------- Version 1.3.0 (November 13, 2004) ------------------------------------------------- This version introduces minor API changes that break existing code. Please read all of the "API CHANGE:" change items in the changelog to bring your ZIG v1.2.5 code up-to-date with more ease. The ZIG v1.3.0 network protocol is now version 3 and is incompatible with previous versions of the library (see PROTOCOL CHANGE: below) - API CHANGE: zigserver_c::process_nonblocking() now returns an int instead of a bool. it returns the number of packets read and processed from client sockets (the call only processes up to one packet per client), or -1 if the server is stopped. - API CHANGE: zigclient_c::process_nonblocking() now returns an int instead of a bool. it returns the number of packets read and processed from it's socket (but the call only processes up to one packet from the server, there might be more waiting on the client's socket), or -1 if some read error occurs or if the client is not connected. - API CHANGE: zigserver_c::client_disconnected() now has an additional "int zig_reason" parameter, which is an int code for the ZIGSERVER_DISCONNECTED_xxxxx enum defined in <zig/zigserver.h>. you might want to log the value somewhere, especially if it is different than zero. - API CHANGE: zigclient_c::disconnected() now has an additional "int zig_reason" parameter, which is an int code for the ZIGCLIENT_DISCONNECTED_xxxxx enum defined in <zig/zigclient.h>. you might want to log the value somewhere, especially if it is different than zero. some of the enum values were being returned in the "int code_reason" parameter, which was bad practice. now the "int code_reason" parameter is totally set aside for disconnection codes used by the game/application, and "int zig_reason" is used for the engine disconnection error codes, if any (when different than zero). - API CHANGE: the default "send policy" for reliable messages is now RSP_HIGHEST instead of RSP_CRITICAL, since ZIG is forced to close connections when pending critical messages cannot fit into one outbound packet. the policy is a parameter of zigclient_c::send_message() and zigserver_c::send_message(). THIS IS IMPORTANT because it has implications on the semantics of some possible game protocols. If you have reliable messages on your game protocol that _must_ be received before the next block of unreliable data is processed, then you should send these with the RSP_CRITICAL attribute, to guarantee that no further data from the unreliable block will be received without all the outbound critical messages. *** WORK-AROUND FOR THE API CHANGE: *** To restore the original behavior of send_message(), place a call on the "init()" callback of your gameclient and gameserver, to " set_default_message_policy(RSP_CRITICAL); " (see below). - NEW API: zigclient_c and zigserver_c have a new method: set_default_send_message_policy(), which can change the default "send policy" (either RSP_HIGHEST or RSP_CRITICAL, but more values may be added in the future) used by the send_message() method of either class. this was added to prevent massive breakage of existing code that relies on RSP_CRITICAL messages being the default "send policy". - DOCUMENTATION FIX: the enumeration "reliable_send_policy_t" used to define the reliable send message policies (such as RSP_CRITICAL and RSP_HIGHEST) is now properly documented and exposed in the public header file <zig/zig.h>. - NEW API: zigclient_c::send_input_packet(), which does actually send an "input" packet to the server immediatelly (in constrast with zigclient_c::send_packet_now(), which just sends a hint to the scheduling mechanism and thus does not send anything directly) - PROTOCOL CHANGE: (and BUG fixed): fix bug where sending message longer than 255 bytes (which was the limit on individual reliable messages) would cause the other side to receive garbage. now the size limit of reliable messages supported by the protocol is increased to 32767 bytes, and attempting to send a message bigger than that will return an error code and the message will not be sent. Thanks to Milan Mimica for reporting the bug. - the default constructor of class console_c was completely broken (called directly another constructor, which is illegal in C++). bug found and fixed by Marcos Slomp. - fixed potential bugs related to UDP packets (before or after the optional compression) exceeded 8Kbytes while being processed internally. the bug was fixed. also, now there is no limit for the sizes of UDP packets handled by ZIG, since all internal buffers for reading and writing UDP packets now resize themselves when needed. - library tweak option: ZIG_UDP_READ_BUFFER_INITIAL_SIZE on <zig/zigdefs.h> specifies the initial size of the UDP packet reading buffers (default is 8Kbytes). this might be important because attempts to read packets bigger than the currently allocated read buffer might cause the packet to be dropped (altough the buffer is then increased in size by "ZIG_UDP_READ_BUFFER_INITIAL_SIZE" bytes, and thus reducing the chance that this happens again in the next read iteration). Previous versions had a 8K hard limit for incoming UDP packets so at least this is an improvement. - the internal mechanism used by the server to measure the round trip time latency between each client and the server has been improved, and should now yield optimal results, especially better now with games which use low network frequencies (1 packet per second, etc). Thanks Marcos Slomp for pointing out this issue and helping to test the fix. - experimental (BETA) feature: zigserver_c::panic_drop() service to "drop" (or so) all packets from clients still pending on sockets. for when the server is too loaded. - module thread.cpp renamed to threadz.cpp to help avoid linkage conflicts with other "thread.cpp" modules while using MSVC++7.NET2003
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use