protected void _socketReceivingMessage(ByteBuffer _buf)
    {
        //将数据放入缓冲中
        try
        {
            _m_bByteBuffer.put(_buf);
        }
        catch (BufferOverflowException e)
        {
            ALServerLog.Error("_socketReceivingMessage length is too long, Socket Buffer need more!");
            _m_bByteBuffer.put(_buf.array(), 0, _m_bByteBuffer.remaining());
            //放置缓冲区读取指针
            _buf.position(_m_bByteBuffer.remaining());
        }
        
        if(0 == _m_sBufferLen)
        {
            //尚未读取长度前
            if(_m_bByteBuffer.position() >= 4)
            {
                //当缓冲中字节大于2时可获取对应的消息长度
                _m_sBufferLen = _m_bByteBuffer.getInt(0);
            }
        }
        
        //当长度有效则判断是否到达消息末尾
        int bufLen = _m_bByteBuffer.position();
        int startPos = 0;
        while(0 != _m_sBufferLen && bufLen >= startPos + _m_sBufferLen + 4)
        {
            //到达消息末尾，将消息取出，并清除缓存消息
            ByteBuffer message = ByteBuffer.allocate(_m_sBufferLen);
            message.put(_m_bByteBuffer.array(), startPos + 4, _m_sBufferLen);
            message.flip();

            startPos = startPos + _m_sBufferLen + 4;
            
            //添加消息
            if(_m_bLoged)
            {
                _m_clClient.receiveMes(message);
            }
            else
            {
                //处理登录操作
                _checkLoginMes(message);
            }
            
            //根据长度设置对应消息长度
            if(bufLen - startPos > 4)
            {
                //当缓冲中字节大于2时可获取对应的消息长度
                _m_sBufferLen = _m_bByteBuffer.getInt(startPos);
            }
            else
            {
                _m_sBufferLen = 0;
                break;
            }
        }

        //当数据经过了拷贝则将剩余数据拷贝放入缓存
        if(startPos != 0)
        {
        	ByteBuffer tmpBuf = ByteBuffer.allocate(bufLen - startPos);
        	tmpBuf.put(_m_bByteBuffer.array(), startPos, bufLen - startPos);
        	tmpBuf.flip();
        	
        	_m_bByteBuffer.clear();
        	_m_bByteBuffer.put(tmpBuf);
        }

        //如原先缓存数据未完全放入，此时将剩余数据放入
        if(_buf.remaining() > 0)
        {
            _m_bByteBuffer.put(_buf);
        }
    }