I'm doing a migration of MFC CAsyncSocket to Win32 APIs(socket), but I have a problem with the method "CAsyncSocket:: OnAccept ()". How can implement my own method for that function?


Currently I have this:
Code:
class CSocketEscuchaP : public CAsyncSocket  
{
public:
    CSocketEscuchaP();
    virtual ~CSocketEscuchaP();

// Overrides
public:
    BOOL IniciaEscucha(CMainFrame *pFrame, UINT nPort);
    virtual void OnAccept(int nErrorCode );
and I want to replace it with my own class, which does not inherit from CAsyncscoket:
Code:
class CSocketEscuchaP 
{
public:
    CSocketEscuchaP();
    virtual ~CSocketEscuchaP();


// Overrides
public:
    BOOL IniciaEscucha(CMainFrame *pFrame, UINT nPort);
     virtual void OnAccept(int nErrorCode );
thanks for reply