Message

Ok, I'm using something like a web service type structure for my networking. This may not be standard but in honesty it is the easiest way I see to do this.

As you know I'm using a union to store the data I get from my networking layer. However I have added another lay to the abstraction. Now I have a message container class that allows components to access the type and length without needing to know what index they are located in.

This class will of course be inherited by other message classes that will be used to access specific properties of a message. For example username & password from the "LoginRequestMessage".

This should make it easier for me to manage this whole thing. I will end up duplicating code no doubt but I'm not that worried about it as I will need to have the client and server versions customized.

I'm Also adding the notion of an inner message. Which is basically the message minus the type and length. I will probably use this later to simplify pulling data from the message. As this will be a pointer to the same data I can use this for setting data as well.

I'm feeling lazy right now though so I think this is about as far as I'm getting tonight.

Comments

Popular posts from this blog

VK9 - Milestone8 Completed

VK9 - Milestone13 Completed

VK9 - Milestone16 Completed