private void ConnectCallback(IAsyncResult ar)
        {
            try
            {
                // Retrieve the socket from the state object.
                Socket sock = (Socket)ar.AsyncState;

                // Complete the connection.
                sock.EndConnect(ar);

                //
                if (m_datacmd == 0)
                {
                    Receive();
                }
                else
                if (m_datacmd == 1)
                {
                    ReceiveFile();
                }
                else
                {
                    SendFile();
                }

                // Signal that the connection has been made.
                m_ftpmonitor.DataSocketConnected();
            }
            catch (Exception ex)
            {
                m_lasterror = ex.Message;
                ErrorNotify("DataAsyncSocket.ConnectCallback");
            }
        }