private void SendDeletePacket(long userId, long id)
        {
            var packetDelete = new PacketDelete();

            packetDelete.Delete.Status.UserId = userId;
            packetDelete.Delete.Status.Id     = id;

            Parallel.ForEach(this.GetConnections(), e => e.SendToStream(packetDelete));
        }
        private void CheckStatus(long id)
        {
            if (this.ShowStatus(id) != null)
            {
                return;
            }

            var packetDelete = new PacketDelete();

            packetDelete.Delete.Status.UserId = 0;
            packetDelete.Delete.Status.Id     = id;

            Parallel.ForEach(this.GetConnections(), e => e.SendToStream(packetDelete));
        }
Example #3
0
    // вызывается из потока собыйти unity
    static private PacketDeleteReady delete(PacketHeader packet)
    {
        PacketDelete delete = UnityEngine.JsonUtility.FromJson <PacketDelete>(packet.json_data);

        return(new PacketDeleteReady(Server0.delete(delete.idname) ? 1 : 0));
    }