Пример #1
0
        public unsafe void SendMessage(byte **message, int *sizes, int count)
        {
            byte   msg_type = PointerHelper.GetByte(message, sizes, TrinityProtocol.MsgTypeOffset);
            ushort msg_id   = PointerHelper.GetUshort(message, sizes, TrinityProtocol.MsgIdOffset);
            int    ms       = ProtocolSemanticRegistry.s_protocolSemantics[msg_type, msg_id];

            m_smmfuncs[ms](message, sizes, count);
        }
Пример #2
0
        public unsafe void SendMessage(byte **message, int *sizes, int count, out TrinityResponse response)
        {
            var    msg_type = PointerHelper.GetUshort(message, sizes, TrinityProtocol.MsgTypeOffset);
            ushort msg_id   = PointerHelper.GetUshort(message, sizes, TrinityProtocol.MsgIdOffset);
            int    ms       = ProtocolSemanticRegistry.s_protocolSemantics[msg_type, msg_id];

            response = m_smrmfuncs[ms](message, sizes, count);
        }
        protected internal unsafe void SendMessage(IMessagePassingEndpoint endpoint, byte **buffers, int *sizes, int count, out TrinityResponse response)
        {
            var e_msg_type = PointerHelper.GetUshort(buffers, sizes, TrinityProtocol.MsgTypeOffset);

            PointerHelper.Add(buffers, sizes, TrinityProtocol.MsgIdOffset, m_MessageIdOffsets[e_msg_type]);

            endpoint.SendMessage(buffers, sizes, count, out response);
        }