Example #1
0
        public static void CreateNewConnection(TcpClient tempClient)

        {
            Client newClient = new Client();

            newClient.socket       = tempClient;
            newClient.connectionID = ((IPEndPoint)tempClient.Client.RemoteEndPoint).Port;
            newClient.Start();
            Sabitler.bagli_client.Add(newClient.connectionID, newClient);
            DataSender.SendHosGeldinMesaji(newClient.connectionID);
        }
Example #2
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();
        }