//===========================================================================// // File: NetAutoPacketSpliter.hpp //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- ---------------------------------------------------------- // // 01/06/1999 JSE Inital coding //---------------------------------------------------------------------------// // Copyright (C) 1998, Microsoft Corp. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #pragma once #include "MW4.hpp" #include "NetConstants.hpp" #include "NetUpdateManager.hpp" #include "MWEntityManager.hpp" namespace MechWarrior4 { class NetUpdateSortEntry: public Stuff::Plug { public: Entity *m_entity; int m_size; int m_type; UpdateRate m_rate; NetUpdateSortEntry(Entity *entity, int size, int type, UpdateRate rate); }; //########################################################################## class NetUpdatePageHolder: public Stuff::Plug { public: int entryCount; int totalMaxSize; ChainOf m_UpdateEntries; NetUpdatePageHolder(int page_overhead); ~NetUpdatePageHolder(); bool IsThereRoom(NetUpdateSortEntry *entry, int paragraph_overhead); void AddToList(NetUpdateSortEntry *entry, int paragraph_overhead); void AddSelfToDictionary(Dictionary *dictionary, int page_number); }; //########################################################################## //########################################################################## class NetUpdateSorter: public Stuff::Plug { public: int m_debugLevel; int m_bandwidth; int pageOverhead; int paragraphOverhead; ChainOf m_halfhzList; ChainOf m_oneHzList; ChainOf m_twoHzList; ChainOf m_threeHzList; ChainOf m_fourHzList; ChainOf m_sixHzList; ChainOf m_eightHzList; ChainOf m_nineHzList; ChainOf m_twelveHzList; ChainOf m_sixteenHzList; ChainOf *updateList[10]; NetUpdateSorter(int debug_level, int connection_rate); ~NetUpdateSorter(); void AddUpdateToList(Entity *entity, int type, UpdateRate rate); void MakeDictionaryPages(Dictionary *dictionary); void FindPageWithRoom(ChainOf *pages, NetUpdateSortEntry *entry); }; };