Пример #1
0
        public void Send(IMessage message)
        {
            switch (this.AService.ServiceType)
            {
            case ServiceType.Inner:
            {
                (ushort opcode, MemoryStream stream) = MessageSerializeHelper.MessageToStream(0, message);
                OpcodeHelper.LogMsg(this.DomainZone(), opcode, message);
                this.Send(0, stream);
                break;
            }

            case ServiceType.Outer:
            {
                (ushort opcode, MemoryStream stream) = MessageSerializeHelper.MessageToStream(message);
                OpcodeHelper.LogMsg(this.DomainZone(), opcode, message);
                this.Send(0, stream);
                break;
            }
            }
        }
Пример #2
0
 public void Send(long actorId, IMessage message)
 {
     (ushort opcode, MemoryStream stream) = MessageSerializeHelper.MessageToStream(actorId, message);
     OpcodeHelper.LogMsg(this.DomainZone(), opcode, message);
     this.Send(actorId, stream);
 }