From The Mana World
(inital version)
 
m (add some stuff)
Line 1: Line 1:
This is my plan for centralizing the net code under the merged client.
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.
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):
Layout of the new Net namespace (this is a partial list, so please expand):
Line 11: Line 11:
*Being
*Being
*Player
*Player
*LocalPlayer
**IncStat
**IncStat
**DecStat
**DecStat
Line 24: Line 25:
**Use
**Use
*Trade
*Trade
**Request
**AddItem
**AddItem
**RemoveItem
**RemoveItem
Line 45: Line 47:
**Store
**Store
**Retrieve
**Retrieve
*Admin/GM (what's a good name for this?)
**Announce
**Kick
**Ban
**...

Revision as of 04:17, 24 March 2009

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
    • ...