BnMcG/Jeu-Server — pull request #3 by dnguyen (2013-03-19 21:27:22+00:00)
Title: Refactored message/packet handling

Just to give you an idea on how to handle messages better. There are still some errors since I didn't refactor the client, so you probably don't want to merge this!

I also haven't looked into any built in decoders/encoders for Netty, so you might want to use Netty to handle messages instead.

#### Changes I made
* Uses a HashMap to determine what the message is.
* Server will pass the message to a specific handler class based on the header of the message (protocolMessage[0]).
* Changed NettyServer to use PlayerServerPipelineFactory as it's pipeline (I was getting exceptions whenever the server tried to send a string to the client. This seemed to fixed it: http://stackoverflow.com/a/9272460)