//Invoke by Transporter, process the message
    internal void processMessage(byte[] bytes)
    {
        Package pkg = PackageProtocol.Decode(bytes);

        //Ignore all the message except handshading at handshake stage
        if (pkg.type == enPackageType.Handshake && this.state == enProtocolState.handshaking)
        {
            //Ignore all the message except handshading
            MessageObject data = (MessageObject)SimpleJson.SimpleJson.DeserializeObject(Encoding.UTF8.GetString(pkg.body));

            ProcessHandshakeData(data);

            this.state = enProtocolState.working;
        }
        else if (pkg.type == enPackageType.Heartbeat && this.state == enProtocolState.working)
        {
            this.heartBeatService.ResetTimeout();
        }
        else if (pkg.type == enPackageType.Data && this.state == enProtocolState.working)
        {
            this.heartBeatService.ResetTimeout();
            pomeloClient.ProcessMessage(messageProtocol.Decode(pkg.body));
        }
        else if (pkg.type == enPackageType.Kick)
        {
            this.GetPomeloClient().Disconnect();
            this.Close();
        }
    }
        public static void protocolProcess(byte[] bytes)
        {
            MessageObject dict         = new MessageObject();
            MessageObject serverProtos = new MessageObject();
            MessageObject clientProtos = new MessageObject();

            MessageProtocol messageProtocol = new MessageProtocol(dict, serverProtos, clientProtos);
            Package         pkg             = PackageProtocol.Decode(bytes);

            messageProtocol.Decode(pkg.body);
        }