I'm attempting to derive a class from CSocket/CAsyncSocket (preferably CSocket) so that I can override the OnReceive function. For some reason, my OnReceive override NEVER gets called. It's getting VERY frustrating. Here is the basic stuff that I have....
my soc.h file
class MySocket : public CAsyncSocket
{
public:
CAsyncSocket *Socket;
virtual void OnReceive(int nError);
};
my .cpp file
#include "soc.h"
void MySocket::OnReceive(int nError);
{
//Do something here
CAsyncSocket::OnReceive(nError);
}
It seems that this would give me control of the OnReceive funtion...but it never works! Can someone PLEASE help me in this subject before I take a bat to my computer! Thanks in advance!
Niky Williams
my soc.h file
class MySocket : public CAsyncSocket
{
public:
CAsyncSocket *Socket;
virtual void OnReceive(int nError);
};
my .cpp file
#include "soc.h"
void MySocket::OnReceive(int nError);
{
//Do something here
CAsyncSocket::OnReceive(nError);
}
It seems that this would give me control of the OnReceive funtion...but it never works! Can someone PLEASE help me in this subject before I take a bat to my computer! Thanks in advance!
Niky Williams