Class CAsyncSocket::
DeleteSocketFromThread()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: DeleteSocketFromThreadNext page: DeleteTimerProc    Show member index
Public Function Declared in:
AsyncSocket.h

'Declaration' icon -- Shortcut to top of page. Declaration

virtual void DeleteSocketFromThread(
    DWORD dwTimeToWait);

'Description' icon -- Shortcut to top of page. Description

Delete an async socket in his own thread

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    if (!dwTimeToWait)
        DeleteSocketFromThread();
    else
    {
        //We are closing
        SocketClosing();

        //Are we valid ?
        //And do we have a window
        if (!m_bList)
            OnSocketDelete();
        else
        {
            //Create a timer
            m_aDeleteTimerID=m_pThreadManager->RegisterTimeout(dwTimeToWait,
                                                               DeleteTimerProc,
                                                               (LPVOID)this,
                                                               TRUE,
                                                               GetWindowHandle(),
                                                               &m_aDeleteTimerID);

            //Do we have the timer ?
            if (!m_aDeleteTimerID.iTimerID)
            {
                //Report it
                ReportError("DeleteSocketFromThread","Failed to create timeout!");

                //Run regular delete
                DeleteSocketFromThread();
            }
        }
    }
}
ERROR_HANDLER("OnSocketDelete")

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Protected base class CSpoofBase  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.