class CClientSock : public CSocket
{
public:
CClientSock();
virtual ~CClientSock();
};
class CSrvsock : public CSocket
{
public:
CSrvsock();
virtual ~CSrvsock();
};
为什么要弄2个呢,只是为了名字区别下吗?好读懂点吗
{
public:
CClientSock();
virtual ~CClientSock();
};
class CSrvsock : public CSocket
{
public:
CSrvsock();
virtual ~CSrvsock();
};
为什么要弄2个呢,只是为了名字区别下吗?好读懂点吗
OnAccept
Notifies a listening socket that it can accept pending connection requests by calling Accept.
OnClose
Notifies a socket that the socket connected to it has closed.
OnConnect
Notifies a connecting socket that the connection attempt is complete, whether successfully or in error.
OnOutOfBandData
Notifies a receiving socket that there is out-of-band data to be read on the socket, usually an urgent message.
OnReceive
Notifies a listening socket that there is data to be retrieved by calling Receive.
OnSend
Notifies a socket that it can send data by calling Send.
但是你要是有扩展就得弄两个了
客户端和服务器的socket肯定要有不同的成员属性吧
所以为了可扩展性好,还是用两个好吧