Exemplo n.º 1
0
        protected static void konnectCallBack(IAsyncResult ar)
        {
            karlient konteks = (karlient)ar.AsyncState;

            try
            {
                konteks.xSocket.EndConnect(ar);
                if (konteks.xSocket.Connected)
                {
                    konteks.OnStateChanged(true, "[+] Client Successfully connected to server");
                }
            }
            catch (SocketException e)
            {
                konteks.OnStateChanged(false, "[-] Client failed to connect to server.../");
            }
        }
Exemplo n.º 2
0
        protected static void disKonnectCallBack(IAsyncResult ar)
        {
            karlient konteks = (karlient)ar.AsyncState;

            try
            {
                konteks.xSocket.EndDisconnect(ar);
            }
            catch (SocketException e)
            {
                // lmao
            }
            konteks.OnStateChanged(false, "[-] Successfully disconnected from server");
        }