Exemplo n.º 1
0
        internal void DestroyVirtualClientGroup(VirtualClientGroup vcGroup)
        {
            Packet packet = new Packet(0)
            {
                InstanceId = (long)VirtualPacketFlag.GenerateFlag(TransrouterMessage.DestroyClientGroup, 0)
            };

            VirtualPacketFlag.SetSecondaryTargetID(packet, vcGroup.ID);
            this.tcpClient.Transmit(packet);
        }
Exemplo n.º 2
0
        public VirtualClientGroup CreateVirtualClientGroup()
        {
            int    num    = Interlocked.Increment(ref this.nextGroupID);
            Packet packet = new Packet(0)
            {
                InstanceId = (long)VirtualPacketFlag.GenerateFlag(TransrouterMessage.CreateClientGroup, 0)
            };

            VirtualPacketFlag.SetSecondaryTargetID(packet, num);
            this.tcpClient.Transmit(packet);
            return(new VirtualClientGroup(this, num));
        }
Exemplo n.º 3
0
        public void Remove(VirtualClient virtualClient)
        {
            if (virtualClient.Server != this.server)
            {
                throw new ArgumentException("Different virtual server.");
            }
            Packet packet = new Packet(0)
            {
                InstanceId = (long)VirtualPacketFlag.GenerateFlag(TransrouterMessage.RemoveClientGroupMember, virtualClient.ID)
            };

            VirtualPacketFlag.SetSecondaryTargetID(packet, this.id);
            this.server.Transmit(packet);
        }