From The Mana World
This is my plan for centralizing the net code under the merged client.
First, TMWServ's Net namespace needs to be changed (I vote for TMWserv as the new name). Then a new Net name space would be created to hide the details of the netcode (all the relevant #ifdefs). This allows us to move most (f not all) netcode out of the rest of the classes and better merge them. As we fix the netcode backends, only the functions in the Net namespace need to be changed. The methods in this namespace will probably be inlined, as they will eventually just call another method (in the majority of cases).
Layout of the new Net namespace (this is a partial list, so please expand):
Net
- Login
- Char
- Chat
- Being
- Player
- LocalPlayer
- IncStat
- DecStat
- NPC
- Next/Continue
- Close
- List
- Integer
- String
- (post functions)
- Skill
- Up
- Use
- Trade
- Request
- AddItem
- RemoveItem
- SetMoney
- Confirm
- Finish
- Cancel
- Party
- Create
- Join
- Leave
- Kick
- Chat
- Guild
- Create
- Join
- Chat
- Storage
- Open
- Close
- Store
- Retrieve
- Admin/GM (what's a good name for this?)
- Announce
- Kick
- Ban
- ...