[GNE]GNE Release Candidate
Brought to you by:
gillius
From: Gillius <gi...@ma...> - 2003-08-11 02:22:57
|
I've checked in what I hope is the last of all major changes to GNE in the last 13 months. I decided that I wanted to refactor the API, and I figured that if I was going to break backwards compatiblity I should do it all in one go. I'm getting anxious to make a release but I am working very hard to make sure not to put out a product with any major holes or bugs. Before I decided to do the refactor I was very well on my way to finishing the high-level API. For the next release the high-level API will not be by any means finished. I didn't want to remove any code, so for the next release anything marked as "high-level GNE" is strictly experimental - It's still very much in progress and its API may drastically change, espically since I coded it before the mid-level API refactor. You will find all of the major concepts for GNE are still intact. The hugest change I've made is a move to smart pointers for the listeners and threads and other major GNE objects. The implementation I use adds no overhead to accessing the objects and the overhead for deletion and creation is very small (but it wouldn't matter anyways since you aren't saying new ClientConnection() in the middle of a tight render loop!). This should remove those embarassing delete conn; delete this; type constructs and greatly simplify the use of the code by having to worry about memory management. The following document is incomplete but shows some of the major API changes: http://www.rit.edu/~jpw9607/gne/apichanges.htm The release candidate code can be found in the current CVS repository -- please note due to problems with SF's CVS servers the delay is about 24 hours before the general public sees the code, and my latest changes were made Sunday night, and more may come. The only piece of work I am considering now is improving the RawPacket class to do buffer overflow and buffer underflow checking by throwing exceptions, and fix up a little bit about how it manages memory. Here is the current change log that covers all the changes that were not part of the huge API refactor: GNE 0.55 to current Fixed a extremely unlikely condition where a SyncConnection may be waiting forever to get its next packet. Major reworking of the connecting code, and added a state to Connection to help keep track of things. These changes fixed some bugs including at least one deadlock, and increased robustness when GNE is shutdown while a Connection is connecting (so it can fail and quit early). Complete reexamination and major overhaul of event generation to listeners, and the synchronization that occured as a result. Hopefully this will get rid of the deadlocks and hopefully most if not all of the remaining bugs dealing with connections. Fixed 2 memory leaks in Connection. Fixed overflow bugs in Time. The debug log isn't shutdown when an explicit GNE::shutdownGNE call is made. This resolves some hard-to-avoid crashes when using the gnedbg macros. Instead logging runs in its own atexit after GNE's. Added the PacketStream::writePacket method taking a SmartPtr. LockObject nad LockObjectEx added. These work on SynchronizedObjects like gout. onTimeout events were being generated even when the timeout value was set to 0. Like Connections and Timers, ServerConnectionListeners can live after being "lost". The method ServerConnectionListener::closeAllListeners was added. Thread::requestAllShutdown, Timer::stopAll, Connection::disconnectAll methods added. optional clearOnExit param to Console::initConsole Thread::waitForAllThreads didn't work right at all. How did I miss that?! Major API changes, see http://www.rit.edu/~jpw9607/gne/apichanges.htm There were a LOT of changes not listed here. That document covers most of what is not listed here. Added Console::mclearConsole method. Added ObjectBroker, ObjectBrokerClient, ObjectBrokerServer. Added ChannelProvider and ChannelPacket to add in channel functionality into GNE. Added clock synchronization capability into the PingPacket class. Added copy constructor and operator= to Time class. Modified exisiting packet classes and examples to use RawPacket::getSizeOf. Added RawPacket::getSizeOf functions. You should now use these rather than the sizeof operator when determining the serialized size of the packet. Added RawPacket operators to read and write GNE::Time objects. Added operators *, /, *=, /= for integers in the Time class. Added Time::getTotalmSec, to return total milliseconds time. Added a debugging system for mutexes which is active when compiling GNE in debugging mode. It detects the following cases: * If you try to release a mutex you have not acquired, or if you try to release a mutex that the current thread does not own. * If you try to destroy a mutex that is still locked. The mutex now keeps track of a recursive count, and who owns it, which can be viewed easily when debugging by most debuggers. Added the ConsoleBuffer and TextConsole classes, a word-wrapping window that supports scrolling, and an arbitrary rendering device. Changed header include scheme to get rid of any extra header files I could, most notably my main goal was to get rid of forcing the user to have windows.h included indirectly through gnelib.h. |