Ejemplo n.º 1
0
        public static void Handle_Anim_Al(int connectionID, byte[] data)
        {
            Kaan_ByteBuffer buffer = new Kaan_ByteBuffer();

            buffer.Bytes_Yaz(data);
            int    packetID = buffer.Int_Oku();
            string animasyon_kimde_oynayacak = buffer.String_Oku();
            string anim_Adi = buffer.String_Oku();
            int    akiflik  = buffer.Int_Oku();

            DataSender.SendAnimGonder(connectionID, animasyon_kimde_oynayacak, anim_Adi, akiflik);

            buffer.Dispose();
        }
Ejemplo n.º 2
0
        public static void HandleMerhabaServer(int connectionID, byte[] data)
        {
            Kaan_ByteBuffer buffer = new Kaan_ByteBuffer();

            buffer.Bytes_Yaz(data);
            int    packetID = buffer.Int_Oku();
            string msg      = buffer.String_Oku();

            buffer.Dispose();
            Yazi.Gelen_Mesaj(connectionID + " " + msg);
            DataSender.SendHodsgeldinMesaji(connectionID);
        }
Ejemplo n.º 3
0
        public static void HandleMesajal(int connectionID, byte[] data)

        {
            Kaan_ByteBuffer buffer = new Kaan_ByteBuffer();

            buffer.Bytes_Yaz(data);
            int    packetID = buffer.Int_Oku();
            string msg2     = buffer.String_Oku();

            Yazi.Gelen_Mesaj(connectionID + " " + msg2);
            DataSender.Sendmesaj(connectionID, msg2);
            buffer.Dispose();
        }
Ejemplo n.º 4
0
        public static void HandleLoginGiris(int connectionID, byte[] data)
        {
            Kaan_ByteBuffer buffer = new Kaan_ByteBuffer();

            buffer.Bytes_Yaz(data);
            int    packetID      = buffer.Int_Oku();
            string kullanici_adi = buffer.String_Oku();
            string sifre         = buffer.String_Oku();

            ArrayList Ara = new ArrayList();

            Ara.Add("kullanici_adi='" + kullanici_adi + "'");
            Ara.Add("sifre='" + sifre + "'");

            MySqlCommand cmd = Sabitler.Mysql_Data.MySql_Veri_Cek(Sabitler.bagli_client[connectionID].baglanti, null, "Select * From tum_kullanicilar", Ara);

            if (cmd != null)
            {
                MySqlDataReader oku = cmd.ExecuteReader();

                int id = 0;
                while (oku.Read())
                {
                    //////
                    id = (int)oku["id"];
                    Yazi.Log_yaz("Bağlanan Kullanıcın Kullancı ID si : " + id.ToString());
                }
                oku.Close();

                ///
                DataSender.SendLoginGirisCevap(connectionID, 1);
            }
            else
            {
                DataSender.SendLoginGirisCevap(connectionID, 0);
            }
            buffer.Dispose();
        }