void CServerDlg::OnListen()
{
    //      
    UpdateData();    
    //     
    if (m_Sock->Create(m_Port,SOCK_STREAM,"127.0.0.1"))
    {
        //    
        if (m_Sock->Listen()) {
            //      
            CStatic* stat = (CStatic*)GetDlgItem(IDC_STATIC);
            CString str;
            str.Format("Listening on port %d", m_Port);
            stat->SetWindowText(str);
            //  IP- 
            stat = (CStatic*)GetDlgItem(IDC_MSG);
            UINT port;
            m_Sock->GetSockName(str,port);
            stat->SetWindowText(str);
        }
    }
}
