Esempio n. 1
0
        private static void server_cC(karver sender, karlient client)
        {
            Console.WriteLine("[+] Client Successfully connected!!");

            client.packetReceived += client_packetReceived;
            client.stateChanged   += client_stateChanged;

            client.Start();

            lock (clientz)
            {
                clientz.Add(client);
            }
        }
Esempio n. 2
0
        protected static void acceptCallBack(IAsyncResult ar)
        {
            karver konteks = (karver)ar.AsyncState;

            try
            {
                Socket   koneksi = konteks.socket.EndAccept(ar);
                karlient client  = new karlient(koneksi);

                konteks.OnKlientKonnected(client);
            }
            catch (SocketException e)
            {
            }
            konteks.socket.BeginAccept(new AsyncCallback(acceptCallBack), konteks);
        }