The DEngine class performs event-handling for other classes. Each class that uses the event system takes a DEngine in its constructor. When the DEngine's update function is called, it dispatches any events belonging to those classes. The events are dispatched one at a time, and won't interrupt running code. (Unless update is called in a separate thread!) We can respond to events without needing to worry about cross-thread synchronization. The resolution of the events' timing depends on how often update is called, for example calling update 10 times per second gives a resolution of 100 milliseconds.
Default constructor, creates a new DEngine.
Returns the computer's byte-order, which is one of these values from the EndianType enumeration: DA_UNKNOWN, DA_BIG_ENDIAN, or DA_LITTLE_ENDIAN.
Returns a description of the most recent error.
Returns the Boost io_service used for networking events, which is mainly useful if you want to use the Boost library directly.
Makes the calling thread sleep for the specified number of milliseconds.
Should be called periodically to dispatch events. Up to maxEvents will be processed. If maxEvents is -1, all queued events will dispatched. This can cause update to block if we're receiving a large amount of data, as the underlying networking system can add new events while update is being called. Update returns the number of events that were dispatched. It returns -1 if errors were encountered, and sets errMsg.